Registry / crypto / sp-runtime-interface

sp-runtime-interface

JSON →
library35.0.0rscratesunverified

Substrate runtime interface for defining host functions and runtime APIs.

# Cargo.toml [dependencies] sp-runtime-interface = "35.0.0"
INSTALL
IMPORT
SIG · SP-RUNTIME-INTERFA
S
sp-runtime-interface
cryptorustv35.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.

runtime_interface
use sp_runtime_interface::runtime_interface;

Defines a runtime interface trait using the runtime_interface macro.

use sp_runtime_interface::runtime_interface; #[runtime_interface] trait MyInterface { fn my_function(data: &[u8]) -> Vec<u8> { data.to_vec() } } fn main() { let result = my_function(b"hello"); println!("{:?}", result); }
Debug
Known issues
gotchaOnly works within a Substrate runtime environment; not for standalone use.
fix
Ensure you are building a Substrate runtime and have the correct dependencies.
affects: >=35.0.0
Upgrade
Version history
35.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
12
Amazon
1
Resources
sp-runtime-interface — cargo add sp-runtime-interface · libregistry