Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

add doc-only substrate entry point crate #14581

Merged
merged 33 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6b98d98
add doc-only substrate entry point crate
kianenigma Jul 14, 2023
459213f
document a few more things
kianenigma Jul 15, 2023
1de5fa6
merged
kianenigma Jul 15, 2023
cfc01cf
add more
kianenigma Jul 15, 2023
454b2e8
fix width
kianenigma Jul 17, 2023
3979cb6
Merge branch 'master' of github.com:paritytech/substrate into kiz-imp…
kianenigma Jul 17, 2023
46576c7
Update primitives/io/src/lib.rs
kianenigma Jul 17, 2023
a204f08
Merge branch 'master' of github.com:paritytech/substrate into kiz-imp…
kianenigma Jul 17, 2023
99ef6ad
add link
kianenigma Jul 17, 2023
707b17c
update cargo toml file
kianenigma Jul 17, 2023
f7e04bc
fix sp-io docs
kianenigma Jul 17, 2023
d31b20a
improve
kianenigma Jul 18, 2023
c4cda2c
Merge branch 'master' of github.com:paritytech/substrate into kiz-imp…
kianenigma Jul 18, 2023
113798b
small update
kianenigma Jul 18, 2023
993f7b5
add license
kianenigma Jul 18, 2023
28e0cc0
satisfy license job
kianenigma Jul 18, 2023
76536cf
add a line about FRAME
kianenigma Jul 18, 2023
87a5e0b
CI happy now
kianenigma Jul 18, 2023
18a8501
make CI more happy
kianenigma Jul 18, 2023
f7f3e26
Let the check run for the whole workspace
bkchr Jul 18, 2023
58d52cf
Forward the substrate node again as default run
bkchr Jul 18, 2023
99cf521
update binary names
kianenigma Jul 19, 2023
dd4b1af
Merge branch 'master' of github.com:paritytech/substrate into kiz-imp…
kianenigma Jul 19, 2023
b7cb7a4
upate verison test
kianenigma Jul 19, 2023
ebd1556
Fix fix fix
bkchr Jul 19, 2023
81e217f
Merge branch 'kiz-improve-primitives-docs' of github.com:paritytech/s…
bkchr Jul 19, 2023
1d3e508
Fix
bkchr Jul 19, 2023
66960f8
rename to substrate-node in more places
kianenigma Jul 19, 2023
73ea6a4
Revert "rename to substrate-node in more places"
kianenigma Jul 19, 2023
72a3ecb
fix
kianenigma Jul 19, 2023
38a721a
Fix build pipeline
bkchr Jul 19, 2023
04e9be0
Merge branch 'kiz-improve-primitives-docs' of github.com:paritytech/s…
bkchr Jul 19, 2023
b51821f
Fix properly plus add some docs
bkchr Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
[package]
name = "substrate"
description = "Next-generation framework for blockchain innovation"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
version = "0.0.0"

# This list of dependencies is for documentation purposes only.
[dependencies]
aquamarine = "0.3.2"

sc-service = { path = "client/service" }
sc-cli = { path = "client/cli" }
sc-consensus-aura = { path = "client/consensus/aura" }
sc-consensus-babe = { path = "client/consensus/babe" }
sc-consensus-grandpa = { path = "client/consensus/grandpa" }
sc-consensus-beefy = { path = "client/consensus/beefy" }
sc-consensus-manual-seal = { path = "client/consensus/manual-seal" }
sc-consensus-pow = { path = "client/consensus/pow" }

sp-runtime = { path = "primitives/runtime" }

frame-support = { path = "frame/support" }

[workspace]
resolver = "2"

Expand Down
3 changes: 3 additions & 0 deletions client/cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

//! Various subcommands that can be included in a substrate-based chain's CLI.

mod build_spec_cmd;
mod chain_info_cmd;
mod check_block_cmd;
Expand Down
4 changes: 3 additions & 1 deletion client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.

//! Substrate CLI library.
//!
//! To see a full list of commands available, see [`commands`].

#![warn(missing_docs)]
#![warn(unused_extern_crates)]
Expand All @@ -26,7 +28,7 @@ use clap::{CommandFactory, FromArgMatches, Parser};
use sc_service::Configuration;

pub mod arg_enums;
mod commands;
pub mod commands;
mod config;
mod error;
mod params;
Expand Down
66 changes: 57 additions & 9 deletions primitives/io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,67 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! I/O host interface for substrate runtime.
//! # Substrate Primitives: IO
//!
//! This crate contains interfaces for the runtime to communicate with the outside world, ergo `io`.
//! In other context, such interfaces are referred to as "**host functions**".
//!
//! Each set of host functions are defined with an instance of the
//! [`sp_runtime_interface::runtime_interface`] macro.
//!
//! Most notably, this crate contains host functions for:
//!
//! - [`hashing`]
//! - [`crypto`]
//! - [`trie`]
//! - [`offchain`]
//! - [`storage`]
//! - [`allocator`]
//! - [`logging`]
//!
//! All of the default host functions provided by this crate, and by default contained in all
//! substrate-based clients are amalgamated in [`SubstrateHostFunctions`].
//!
//! ## Externalities
//!
//! Host functions go hand in hand with the concept of externalities. Externalities are an
//! environment in which host functions are provided, and thus can be accessed. Some host functions
//! are only accessible in an externality environment that provides it.
//!
//! A typical error for substrate developers is the following:
//!
//! ```should_panic
//! use sp_io::storage::get;
//! # fn main() {
//! let data = get(b"hello world");
//! # }
//! ```
//!
//! This code will panic with the following error:
//!
//! ```no_compile
//! thread 'main' panicked at '`get_version_1` called outside of an Externalities-provided environment.'
//! ```
//!
//! Such error messages should always be interpreted as "code accessing host functions accessed
//! outside of externalities".
//!
//! An externality is any type that implements [`sp_externalities::Externalities`]. A simple example
//! of which is [`TestExternalities`], which is commonly used in tests and is exported from this
//! crate.
//!
//! ```
//! use sp_io::{storage::get, TestExternalities};
//! # fn main() {
//! TestExternalities::default().execute_with(|| {
//! let data = get(b"hello world");
//! });
//! # }
//! ```

#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(enable_alloc_error_handler, feature(alloc_error_handler))]
#![cfg_attr(
feature = "std",
doc = "Substrate runtime standard library as compiled when linked with Rust's standard library."
)]
#![cfg_attr(
not(feature = "std"),
doc = "Substrate's runtime standard library as compiled without Rust's standard library."
)]

use sp_std::vec::Vec;

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ exceptions = [
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "sc-transaction-pool" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "sc-transaction-pool-api" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "subkey" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "substrate" },
]

# Some crates don't have (easily) machine readable licensing information,
Expand Down
Loading