Unverified Commit 74b2248f authored by Michael Müller's avatar Michael Müller Committed by GitHub
Browse files

Clean up leftover `ink_lang` references (#1404)

parent 94a08314
Pipeline #215901 passed with stages
in 18 minutes and 7 seconds
......@@ -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`.
......
......@@ -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)
<br/>
......@@ -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. |
......
......@@ -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;
}
......
......@@ -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"]
......
......@@ -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()
......
......@@ -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)]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment