diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index d74d576b255..c11353c91c7 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -7,10 +7,10 @@ workings of this project. In general we treat documentation as a first-class citizen. All crates mentioned below should be documented really well. You can find the crate documentation on docs.rs or for our -`master` branch under GitHub pages. So for `ink_lang` e.g.: +`master` branch under GitHub pages. So for `ink` e.g.: -* [https://docs.rs/ink_lang/latest/ink_lang](https://docs.rs/ink_lang/latest/ink_lang) (latest) -* [https://paritytech.github.io/ink/ink_lang](https://paritytech.github.io/ink/ink_lang) (`master`) +* [https://docs.rs/ink/latest/ink](https://docs.rs/ink/latest/ink) (latest published release) +* [https://paritytech.github.io/ink/ink](https://paritytech.github.io/ink/ink) (`master`) ink! is composed of a number of crates that are all found in the `crates/` folder. On a high-level those can be grouped as: @@ -65,10 +65,10 @@ The above diagram shows the main components of the ink! language and how they interact. This pipeline is run once you execute `cargo build` on an ink! smart contract. -The central delegating crate for the ink! eDSL is `ink_lang`. +The central delegating crate for the ink! eDSL is `ink`. -In the `crates/lang/` folder you'll find three separate -crates on which `ink_lang` relies heavily: +In the `crates/ink/` folder you'll find three separate +crates on which `ink` relies heavily: * `ink_macro`: The procedural macros, they take code annotated with e.g. `[ink::contract]` and forwards it to `ink_ir`. diff --git a/README.md b/README.md index badfffd01b8..d5e98eff016 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ [i1]: https://img.shields.io/badge/click-blue.svg [i2]: https://paritytech.github.io/ink/ink_prelude [j1]: https://img.shields.io/badge/click-blue.svg -[j2]: https://paritytech.github.io/ink/ink_lang +[j2]: https://paritytech.github.io/ink/ink [k1]: https://img.shields.io/badge/matrix-chat-brightgreen.svg?style=flat [k2]: https://riot.im/app/#/room/#ink:matrix.parity.io [l1]: https://img.shields.io/discord/722223075629727774?style=flat-square&label=discord @@ -31,7 +31,7 @@ [Guided Tutorial for Beginners](https://docs.substrate.io/tutorials/smart-contracts/)  •   [ink! Documentation Portal](https://ink.substrate.io)  •   -[Developer Documentation](https://paritytech.github.io/ink/ink_lang/) +[Developer Documentation](https://paritytech.github.io/ink/ink)
@@ -113,12 +113,13 @@ The `.contract` file combines the Wasm and metadata into one file and needs to b ## Hello, World! ‒ The Flipper The `Flipper` contract is a simple contract containing only a single `bool` value. -It provides methods to + +It provides methods to: + * flip its value from `true` to `false` (and vice versa) and * return the current state. - -Below you can see the code using the `ink_lang` version of ink!. +Below you can see the code using ink!. ```rust #[ink::contract] @@ -227,16 +228,16 @@ In a module annotated with `#[ink::contract]` these attributes are available: | `#[ink(namespace = N:string)]` | Applicable to ink! trait implementation blocks. | Changes the resulting selectors of all the ink! messages and ink! constructors within the trait implementation. Allows to disambiguate between trait implementations with overlapping message or constructor names. Use only with great care and consideration! | | `#[ink(impl)]` | Applicable to ink! implementation blocks. | Tells the ink! codegen that some implementation block shall be granted access to ink! internals even without it containing any ink! messages or ink! constructors. | -See [here](https://paritytech.github.io/ink/ink_lang/attr.contract.html) for a more detailed description of those and also for details on the `#[ink::contract]` macro. +See [here](https://paritytech.github.io/ink/ink/attr.contract.html) for a more detailed description of those and also for details on the `#[ink::contract]` macro. ### Trait Definitions Use `#[ink::trait_definition]` to define your very own trait definitions that are then implementable by ink! smart contracts. -See e.g. the [`examples/trait-erc20`](https://github.com/paritytech/ink/blob/v3.0.0-rc5/examples/trait-erc20/lib.rs#L35-L37) contract on how to utilize it or [the documentation](https://paritytech.github.io/ink/ink_lang/attr.trait_definition.html) for details. +See e.g. the [`examples/trait-erc20`](https://github.com/paritytech/ink/blob/v3.0.0-rc5/examples/trait-erc20/lib.rs#L35-L37) contract on how to utilize it or [the documentation](https://paritytech.github.io/ink/ink/attr.trait_definition.html) for details. ### Off-chain Testing -The `#[ink::test]` procedural macro enables off-chain testing. See e.g. the [`examples/erc20`](https://github.com/paritytech/ink/blob/v3.0.0-rc5/examples/erc20/lib.rs#L248-L250) contract on how to utilize those or [the documentation](https://paritytech.github.io/ink/ink_lang/attr.test.html) for details. +The `#[ink::test]` procedural macro enables off-chain testing. See e.g. the [`examples/erc20`](https://github.com/paritytech/ink/blob/v3.0.0-rc5/examples/erc20/lib.rs#L248-L250) contract on how to utilize those or [the documentation](https://paritytech.github.io/ink/ink/attr.test.html) for details. ## Developer Documentation @@ -246,7 +247,7 @@ the relevant links: | Crate | Docs | Description | |:--|:--|:--| -`ink_lang` | [![][j1]][j2] | Language features exposed by ink!. See [here](https://paritytech.github.io/ink/ink_lang/attr.contract.html) for a detailed description of attributes which you can use in an `#[ink::contract]`. | +`ink` | [![][j1]][j2] | Language features exposed by ink!. See [here](https://paritytech.github.io/ink/ink/attr.contract.html) for a detailed description of attributes which you can use in an `#[ink::contract]`. | `ink_storage` | [![][f1]][f2] | Data structures available in ink!. | `ink_env` | [![][g1]][g2] | Low-level interface for interacting with the smart contract Wasm executor. Contains [the off-chain testing API](https://paritytech.github.io/ink/ink_env/test/index.html) as well. | `ink_prelude` | [![][i1]][i2] | Common API for no_std and std to access alloc crate types. | diff --git a/crates/env/src/types.rs b/crates/env/src/types.rs index a8f60f04bd1..fcdd4793a9b 100644 --- a/crates/env/src/types.rs +++ b/crates/env/src/types.rs @@ -159,7 +159,7 @@ pub trait Environment { /// This is a type that is defined through the `#[ink::chain_extension]` procedural macro. /// For more information about usage and definition click [this][chain_extension] link. /// - /// [chain_extension]: https://paritytech.github.io/ink/ink_lang/attr.chain_extension.html + /// [chain_extension]: https://paritytech.github.io/ink/ink/attr.chain_extension.html type ChainExtension; } diff --git a/crates/ink/Cargo.toml b/crates/ink/Cargo.toml index 2c455dadd98..f4bd7004389 100644 --- a/crates/ink/Cargo.toml +++ b/crates/ink/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" readme = "README.md" repository = "https://github.com/paritytech/ink" -documentation = "https://docs.rs/ink_lang/" +documentation = "https://docs.rs/ink" homepage = "https://www.parity.io/" description = "[ink!] Rust based eDSL for writing smart contracts for Substrate" keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] diff --git a/crates/ink/codegen/src/generator/trait_def/trait_registry.rs b/crates/ink/codegen/src/generator/trait_def/trait_registry.rs index 8200c8d146c..8383bb9a877 100644 --- a/crates/ink/codegen/src/generator/trait_def/trait_registry.rs +++ b/crates/ink/codegen/src/generator/trait_def/trait_registry.rs @@ -15,7 +15,7 @@ //! The global registry with which it is possible to refer back to the global //! trait call builder and call forwarder types using only the trait identifier. //! -//! This works by making the global trait registry type defined in the `ink_lang` +//! This works by making the global trait registry type defined in the `ink` //! crate implement each and every ink! trait definition and defining associated //! types for the trait's respective call builder and call forwarder. @@ -44,7 +44,7 @@ impl<'a> TraitDefinition<'a> { /// Generates the code for the global trait registry implementation. /// /// This also generates the code for the global trait info object which - /// implements some `ink_lang` traits to provide common information about + /// implements some `ink` traits to provide common information about /// the ink! trait definition such as its unique identifier. pub fn generate_trait_registry_impl(&self) -> TokenStream2 { TraitRegistry::from(*self).generate_code() diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index bc9fa2ae37d..f5453da6081 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -14,12 +14,12 @@ //! Utilities in use by ink!. //! -//! These are kept separate from ink core utilities to allow for more dynamic inter-crate dependencies. +//! These are kept separate from ink! core utilities to allow for more dynamic inter-crate dependencies. //! The main problem is that today Cargo manages crate features on a per-crate basis instead of -//! a per-crate-target basis thus making dependencies from `ink_lang` (or others) to `ink_env` or `ink_storage` impossible. +//! a per-crate-target basis thus making dependencies from `ink` (or others) to `ink_env` or `ink_storage` impossible. //! //! By introducing `ink_primitives` we have a way to share utility components between `ink_env` or `ink_storage` and -//! other parts of the framework, like `ink_lang`. +//! other parts of the framework, like `ink`. #![cfg_attr(not(feature = "std"), no_std)]