Files
pezkuwi-subxt/substrate/primitives/io/Cargo.toml
T
Sergei Shulepov 0849bcce0e Embed runtime version as a custom section (#8688)
* emit a custom section from impl_runtime_apis!

This change emits a custom section from the impl_runtime_apis! proc macro.

Each implemented API will result to emitting a link section `runtime_apis`.
During linking all sections with this name will be concatenated and
placed into the final wasm binary under the same name.

* Introduce `runtime_version` proc macro

This macro takes an existing `RuntimeVersion` const declaration, parses
it and emits the version information in form of a linking section.
Ultimately such a linking section will result into a custom wasm
section.

* Parse custom wasm section for runtime version

* Apply suggestions from code review

Co-authored-by: David <dvdplm@gmail.com>

* Fix sc-executor integration tests

* Nits

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Refactor apis section deserialization

* Fix version decoding

* Reuse uncompressed value for CallInWasm

* Log on decompression error

* Simplify if

* Reexport proc-macro from sp_version

* Merge ReadRuntimeVersionExt

* Export `read_embedded_version`

* Fix test

* Simplify searching for custom section

Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-12 13:39:08 +00:00

71 lines
2.4 KiB
TOML

[package]
name = "sp-io"
version = "3.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
description = "I/O for Substrate runtimes"
documentation = "https://docs.rs/sp-io"
readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
hash-db = { version = "0.15.2", default-features = false }
sp-core = { version = "3.0.0", default-features = false, path = "../core" }
sp-keystore = { version = "0.9.0", default-features = false, optional = true, path = "../keystore" }
sp-std = { version = "3.0.0", default-features = false, path = "../std" }
libsecp256k1 = { version = "0.3.4", optional = true }
sp-state-machine = { version = "0.9.0", optional = true, path = "../state-machine" }
sp-wasm-interface = { version = "3.0.0", path = "../wasm-interface", default-features = false }
sp-runtime-interface = { version = "3.0.0", default-features = false, path = "../runtime-interface" }
sp-maybe-compressed-blob = { version = "3.0.0", optional = true, path = "../maybe-compressed-blob" }
sp-trie = { version = "3.0.0", optional = true, path = "../trie" }
sp-externalities = { version = "0.9.0", optional = true, path = "../externalities" }
sp-tracing = { version = "3.0.0", default-features = false, path = "../tracing" }
log = { version = "0.4.8", optional = true }
futures = { version = "0.3.1", features = ["thread-pool"], optional = true }
parking_lot = { version = "0.11.1", optional = true }
tracing = { version = "0.1.25", default-features = false }
tracing-core = { version = "0.1.17", default-features = false}
[features]
default = ["std"]
std = [
"sp-core/std",
"sp-keystore",
"codec/std",
"sp-std/std",
"hash-db/std",
"sp-trie",
"sp-state-machine",
"libsecp256k1",
"sp-runtime-interface/std",
"sp-externalities",
"sp-wasm-interface/std",
"sp-maybe-compressed-blob",
"sp-tracing/std",
"tracing/std",
"tracing-core/std",
"log",
"futures",
"parking_lot",
]
with-tracing = [
"sp-tracing/with-tracing"
]
# These two features are used for `no_std` builds for the environments which already provides
# `#[panic_handler]`, `#[alloc_error_handler]` and `#[global_allocator]`.
#
# For the regular wasm runtime builds those are not used.
disable_panic_handler = []
disable_oom = []
disable_allocator = []