Registry / other / sp-version

sp-version

JSON →
library44.0.0rscratesunverified

Provides runtime version information for Substrate-based blockchains, returning the current spec and implementation versions.

# Cargo.toml [dependencies] sp-version = "44.0.0"
INSTALL
IMPORT
SIG · SP-VERSION
S
sp-version
otherrustv44.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RuntimeVersion
use sp_version::RuntimeVersion;

Constructs and prints a RuntimeVersion struct for a Substrate runtime.

use sp_version::RuntimeVersion; fn main() { let version = RuntimeVersion { spec_name: "my-runtime".into(), impl_name: "my-impl".into(), authoring_version: 1, spec_version: 100, impl_version: 1, apis: vec![], transaction_version: 1, state_version: 1, }; println!("Runtime version: {:?}", version); }
Debug
Known issues
breakingThis crate is part of the Substrate/Polkadot SDK and may have breaking changes across major versions.
fix
Pin to a specific version and follow the Substrate release notes for migration guides.
affects: >=44.0.0
Upgrade
Version history
44.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
sp-version — cargo add sp-version · libregistry