sp-api: Put frame-metadata behind some feature (#14398)

* sp-api: Put `frame-metadata` behind some feature

Closes: https://github.com/paritytech/substrate/issues/14296

* ".git/.scripts/commands/fmt/fmt.sh"

* Review feedback

---------

Co-authored-by: command-bot <>
This commit is contained in:
Bastian Köcher
2023-07-03 11:54:28 +02:00
committed by GitHub
parent d124c90734
commit 698a6d1aa8
8 changed files with 26 additions and 9 deletions
+7 -3
View File
@@ -24,7 +24,7 @@ sp-trie = { version = "22.0.0", default-features = false, optional = true, path
hash-db = { version = "0.16.0", optional = true }
thiserror = { version = "1.0.30", optional = true }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
sp-metadata-ir = { version = "0.1.0", default-features = false, path = "../metadata-ir" }
sp-metadata-ir = { version = "0.1.0", default-features = false, optional = true, path = "../metadata-ir" }
log = { version = "0.4.17", default-features = false }
[dev-dependencies]
@@ -44,9 +44,9 @@ std = [
"thiserror",
"log/std",
"scale-info/std",
"sp-metadata-ir/std",
"sp-metadata-ir?/std",
]
# Special feature to disable logging completly.
# Special feature to disable logging completely.
#
# By default `sp-api` initializes the `RuntimeLogger` for each runtime api function. However,
# logging functionality increases the code size. It is recommended to enable this feature when
@@ -56,3 +56,7 @@ std = [
disable-logging = ["log/max_level_off"]
# Do not report the documentation in the metadata.
no-metadata-docs = ["sp-api-proc-macro/no-metadata-docs"]
frame-metadata = [
"sp-metadata-ir",
"sp-api-proc-macro/frame-metadata"
]