Skip to content

Commit

Permalink
Add missing features in templates' node packages (#5294)
Browse files Browse the repository at this point in the history
Corrects the issue we had
[here](paritytech/polkadot-sdk-parachain-template#10),
in which `cargo build --release` worked but `cargo build --package
parachain-template-node --release` failed with missing features.

The command has been added to CI to make sure it works, but at the same
we're changing it in the readme to just `cargo build --release` for
simplification.

Labeling silent because those packages are un-published as part of the
regular release process.

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent 47c1b4c commit 149c709
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion templates/minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ packages required to compile this template - please take note of the Rust compil
🔨 Use the following command to build the node without launching it:

```sh
cargo build --package minimal-template-node --release
cargo build --release
```

🐳 Alternatively, build the docker image:
Expand Down
5 changes: 4 additions & 1 deletion templates/minimal/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@ minimal-template-runtime = { workspace = true }
substrate-build-script-utils = { workspace = true, default-features = true }

[features]
default = []
default = ["std"]
std = [
"minimal-template-runtime/std",
]
2 changes: 1 addition & 1 deletion templates/parachain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ packages required to compile this template - please take note of the Rust compil
🔨 Use the following command to build the node without launching it:

```sh
cargo build --package parachain-template-node --release
cargo build --release
```

🐳 Alternatively, build the docker image:
Expand Down
7 changes: 6 additions & 1 deletion templates/parachain/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ color-print = { workspace = true }
substrate-build-script-utils = { workspace = true, default-features = true }

[features]
default = []
default = ["std"]
std = [
"log/std",
"parachain-template-runtime/std",
"xcm/std",
]
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion templates/solochain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ installation](#alternatives-installations) options.
Use the following command to build the node without launching it:

```sh
cargo build --package solochain-template-node --release
cargo build --release
```

### Embedded Docs
Expand Down
5 changes: 4 additions & 1 deletion templates/solochain/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ solochain-template-runtime = { workspace = true }
substrate-build-script-utils = { workspace = true, default-features = true }

[features]
default = []
default = ["std"]
std = [
"solochain-template-runtime/std",
]
# Dependencies that are only required if runtime benchmarking should be build.
runtime-benchmarks = [
"frame-benchmarking-cli/runtime-benchmarks",
Expand Down

0 comments on commit 149c709

Please sign in to comment.