From d29b6a1436f7786589935fec1e8f765e144e3208 Mon Sep 17 00:00:00 2001 From: Sacha Lansky Date: Tue, 10 Oct 2023 18:32:25 +0200 Subject: [PATCH] init devhub structure --- Cargo.lock | 4 ++++ Cargo.toml | 1 + devhub/Cargo.toml | 12 ++++++++++++ devhub/src/lib.rs | 6 ++++++ devhub/src/reference_docs/extrinsics.rs | 14 ++++++++++++++ devhub/src/reference_docs/mod.rs | 9 +++++++++ devhub/src/reference_docs/weights.rs | 5 +++++ devhub/src/tutorial/mod.rs | 3 +++ devhub/src/tutorial/step1.rs | 3 +++ 9 files changed, 57 insertions(+) create mode 100644 devhub/Cargo.toml create mode 100644 devhub/src/lib.rs create mode 100644 devhub/src/reference_docs/extrinsics.rs create mode 100644 devhub/src/reference_docs/mod.rs create mode 100644 devhub/src/reference_docs/weights.rs create mode 100644 devhub/src/tutorial/mod.rs create mode 100644 devhub/src/tutorial/step1.rs diff --git a/Cargo.lock b/Cargo.lock index 48ac004a8597..f81a143c3b45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4274,6 +4274,10 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "devhub" +version = "1.0.0" + [[package]] name = "diff" version = "0.1.13" diff --git a/Cargo.toml b/Cargo.toml index aa0b93737f7e..84eff48f735d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,6 +93,7 @@ members = [ "cumulus/test/runtime", "cumulus/test/service", "cumulus/xcm/xcm-emulator", + "devhub", "polkadot", "polkadot/cli", "polkadot/core-primitives", diff --git a/devhub/Cargo.toml b/devhub/Cargo.toml new file mode 100644 index 000000000000..cf90a86ec951 --- /dev/null +++ b/devhub/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "devhub" +description = "A crate for the Polkadot SDK's reference documentation and tutorials" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +homepage = "https://substrate.io" +repository.workspace = true +authors.workspace = true +edition.workspace = true +version = "1.0.0" + +# The dependencies are only needed for docs. +[dependencies] \ No newline at end of file diff --git a/devhub/src/lib.rs b/devhub/src/lib.rs new file mode 100644 index 000000000000..f8d63a071638 --- /dev/null +++ b/devhub/src/lib.rs @@ -0,0 +1,6 @@ +//! # Polkadot SDK Developer Hub +//! +//! The devhub contains reference documentation and a tutorial for building with the Polkadot SDK. + +pub mod reference_docs; +pub mod tutorial; diff --git a/devhub/src/reference_docs/extrinsics.rs b/devhub/src/reference_docs/extrinsics.rs new file mode 100644 index 000000000000..db50c28bdfb0 --- /dev/null +++ b/devhub/src/reference_docs/extrinsics.rs @@ -0,0 +1,14 @@ +//! # Extrinsics and Calls +//! +//! **This page is currently under construction.** +//! +//! Reference documentation for the different types of extrinsics and how to construct them. +//! +//! An extrinsic is some data that can be added to a block, and is either signed (a transaction) or +//! unsigned (an inherent). +//! +//! > Note: The term "call", "extrinsic", and "dispatchable" often get mixed together. +//! > Here is a sentence which should help clarify their relationship, and why they are such similar +//! > terms: +//! > **Users submit an **extrinsic** to the blockchain, which is **dispatched** to a Pallet +//! > **call**.** diff --git a/devhub/src/reference_docs/mod.rs b/devhub/src/reference_docs/mod.rs new file mode 100644 index 000000000000..5d7c2cccf17f --- /dev/null +++ b/devhub/src/reference_docs/mod.rs @@ -0,0 +1,9 @@ +//! # Reference Documentation +//! +//! Reference material for common concepts in Substrate. +//! +//! - [Extrinsics](extrinsics) +//! - [Weights](weights) + +pub mod extrinsics; +pub mod weights; diff --git a/devhub/src/reference_docs/weights.rs b/devhub/src/reference_docs/weights.rs new file mode 100644 index 000000000000..4b7798b35aed --- /dev/null +++ b/devhub/src/reference_docs/weights.rs @@ -0,0 +1,5 @@ +//! # Weights and Benchmarking +//! +//! **This page is currently under construction.** +//! +//! Reference material for how weights and benchmarking works. diff --git a/devhub/src/tutorial/mod.rs b/devhub/src/tutorial/mod.rs new file mode 100644 index 000000000000..5b1307e58b6f --- /dev/null +++ b/devhub/src/tutorial/mod.rs @@ -0,0 +1,3 @@ +//! The Polkadot SDK Master Tutorial + +pub mod step1; diff --git a/devhub/src/tutorial/step1.rs b/devhub/src/tutorial/step1.rs new file mode 100644 index 000000000000..73fd8f59fa60 --- /dev/null +++ b/devhub/src/tutorial/step1.rs @@ -0,0 +1,3 @@ +//! # Step 1 +//! +//! **This module is currently under construction.**