Cargo Features

[dependencies]
gadget-common = { version = "0.1.0", default-features = false, features = ["std", "tangle-testnet", "tangle-mainnet", "substrate", "wasm", "testing"] }
default = std, substrate, tangle-testnet

These default features are set whenever gadget-common is added without default-features = false somewhere in the dependency tree.

std default = sqlx

Enables attributes and std of tracing and std of serde, sp-api ^27.0.1, sp-core ^29.0.0, sp-io ^31.0.0, sp-runtime ^32.0.0, and sp-tracing ^16.0.0

serde:

Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.

Affects keystore::SqliteBackend

tangle-testnet default
tangle-mainnet
substrate default = parity-scale-codec, substrate-prometheus-endpoint, subxt-signer, tangle-subxt

Enables gadget-io ^0.0.1, substrate of gadget-core, jsonrpsee and native of subxt ^0.37.0

Affects client::PairSigner

wasm = parity-scale-codec

Enables substrate of gadget-core, wasm of gadget-io ^0.0.1, js of getrandom, disable_allocator, disable_oom and disable_panic_handler of sp-io ^31.0.0, serde of sp-runtime ^32.0.0, jsonrpsee and web of subxt ^0.37.0, web of subxt-signer ^0.37.0 and alloc of serde

serde:

Provide impls for types in the Rust core allocation and collections library including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may be enabled without depending on all of std.

testing

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

sqlx std

Enables sqlx =0.7.3

tangle-subxt substrate

Enables tangle-subxt ^0.1.4

Substrate

subxt-signer substrate wasm?

Enables subxt-signer ^0.37.0

subxt substrate wasm?

Enables subxt ^0.37.0

substrate-prometheus-endpoint substrate
parity-scale-codec substrate wasm?