Skip to content

Commit b7500ea

Browse files
committed
--bin humanode-runtime-build-selector Cargo target
1 parent 90565b3 commit b7500ea

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.github/actions/plan/modes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ export const build = {
7474
buildRuntimeEvmTracing: {
7575
name: "build runtime with EVM tracing",
7676
cargoCommand: "build",
77-
cargoArgs: "--locked --workspace --release --features evm-tracing",
77+
cargoArgs:
78+
"--locked --release --bin humanode-runtime-build-selector --features evm-tracing",
7879
cargoCacheKey: "release-build-runtime-evm-tracing",
7980
platformIndependent: true,
8081
artifactSelector: "runtime",

crates/humanode-runtime/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ version = "0.1.0"
44
edition = "2021"
55
publish = false
66

7+
[[bin]]
8+
name = "humanode-runtime-build-selector"
9+
path = "src/bin/build_selector.rs"
10+
711
[build-dependencies]
812
substrate-wasm-builder = { workspace = true, optional = true }
913

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//! A stub binary target used to selectively build the WASM runtime via `build.rs`,
2+
//! while ensuring consistent and correct feature resolution across the workspace.
3+
//!
4+
//! If you need to build only the `humanode-runtime` WASM, it will likely be incorrect to run
5+
//! `cargo build --package humanode-runtime --lib`. While seemingly precise, `--package` would build
6+
//! the WASM with the minimally acceptable — and likely untested — set of features. In contrast,
7+
//! using `cargo build --bin humanode-runtime-build-selector` results in Cargo resolving features
8+
//! at the workspace level. The runtime is compiled with the same feature set that has already been
9+
//! tested through regular `--workspace` Cargo runs.
10+
11+
/// A stub binary entrypoint.
12+
pub fn main() {}

0 commit comments

Comments
 (0)