Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no_std compatibility for subxt-signer #1477

Merged
merged 6 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 20 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,41 @@ base58 = { version = "0.2.0" }
bitvec = { version = "1", default-features = false }
blake2 = { version = "0.10.6", default-features = false }
clap = { version = "4.5.2", features = ["derive", "cargo"] }
cfg-if = "1.0.0"
criterion = "0.4"
codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false }
color-eyre = "0.6.1"
console_error_panic_hook = "0.1.7"
darling = "0.20.8"
derivative = "2.2.0"
derive_more = "0.99.17"
either = "1.10.0"
either = { version = "1.10.0", default-features = false }
frame-metadata = { version = "16.0.0", default-features = false }
futures = { version = "0.3.30", default-features = false, features = ["std"] }
getrandom = { version = "0.2", default-features = false }
hashbrown = "0.14.3"
hex = "0.4.3"
hex = { version = "0.4.3", default-features = false }
heck = "0.4.1"
impl-serde = { version = "0.4.0" }
impl-serde = { version = "0.4.0", default-features = false }
indoc = "2"
jsonrpsee = { version = "0.22" }
pretty_assertions = "1.4.0"
primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "serde"] }
primitive-types = { version = "0.12.2", default-features = false }
proc-macro-error = "1.0.4"
proc-macro2 = "1.0.78"
quote = "1.0.35"
regex = "1.10.3"
regex = { version = "1.10.3", default-features = false }
scale-info = { version = "2.10.0", default-features = false }
scale-value = "0.14.1"
scale-bits = "0.5.0"
scale-decode = "0.11.1"
scale-encode = "0.6.0"
serde = { version = "1.0.197" }
serde_json = { version = "1.0.114" }
scale-value = { version = "0.14.1", default-features = false }
scale-bits = { version = "0.5.0", default-features = false }
scale-decode = { version = "0.11.1", default-features = false }
scale-encode = { version = "0.6.0", default-features = false }
serde = { version = "1.0.197", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.114", default-features = false }
syn = { version = "2.0.15", features = ["full", "extra-traits"] }
thiserror = "1.0.57"
tokio = { version = "1.36", default-features = false }
tracing = "0.1.40"
tracing = { version = "0.1.40", default-features = false }
tracing-wasm = "0.2.1"
tracing-subscriber = "0.3.18"
trybuild = "1.0.89"
Expand Down Expand Up @@ -136,21 +137,21 @@ sp-keyring = "31.0.0"
# Subxt workspace crates:
subxt = { version = "0.34.0", path = "subxt", default-features = false }
subxt-macro = { version = "0.34.0", path = "macro" }
subxt-metadata = { version = "0.34.0", path = "metadata" }
subxt-metadata = { version = "0.34.0", path = "metadata", default-features = false }
subxt-codegen = { version = "0.34.0", path = "codegen" }
subxt-signer = { version = "0.34.0", path = "signer" }
subxt-signer = { version = "0.34.0", path = "signer", default-features = false }
subxt-lightclient = { version = "0.34.0", path = "lightclient", default-features = false }
test-runtime = { path = "testing/test-runtime" }
substrate-runner = { path = "testing/substrate-runner" }

# subxt-signer deps that I expect aren't useful anywhere else:
bip39 = "2.0.0"
hmac = "0.12.1"
bip39 = { version = "2.0.0", default-features = false }
hmac = { version = "0.12.1", default-features = false }
pbkdf2 = { version = "0.12.2", default-features = false }
schnorrkel = "0.11.4"
secp256k1 = "0.28.2"
schnorrkel = { version = "0.11.4", default-features = false }
secp256k1 = { version = "0.28.2", default-features = false }
secrecy = "0.8.0"
sha2 = "0.10.8"
sha2 = { version = "0.10.8", default-features = false }
zeroize = { version = "1", default-features = false }

[profile.dev.package.smoldot-light]
Expand Down
2 changes: 1 addition & 1 deletion codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ syn = { workspace = true }
scale-info = { workspace = true }
subxt-metadata = { workspace = true }
jsonrpsee = { workspace = true, features = ["async-client", "client-ws-transport-native-tls", "http-client"], optional = true }
hex = { workspace = true }
hex = { workspace = true, features = ["std"] }
tokio = { workspace = true, features = ["rt-multi-thread"], optional = true }
thiserror = { workspace = true }
scale-typegen = { workspace = true }
Expand Down
104 changes: 4 additions & 100 deletions examples/wasm-example/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lightclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ web = [
[dependencies]
futures = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["raw_value"] }
serde_json = { workspace = true, features = ["default", "raw_value"] }
thiserror = { workspace = true }
tracing = { workspace = true }

Expand Down
25 changes: 14 additions & 11 deletions signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ description = "Sign extrinsics to be submitted by Subxt"
keywords = ["parity", "subxt", "extrinsic", "signer"]

[features]
default = ["sr25519", "ecdsa", "subxt", "native"]
default = ["sr25519", "ecdsa", "subxt", "std", "native"]
std = []
jsdw marked this conversation as resolved.
Show resolved Hide resolved

# Pick the signer implementation(s) you need by enabling the
# corresponding features. Note: I had more difficulties getting
Expand All @@ -35,25 +36,27 @@ native = ["subxt?/native"]

[dependencies]
subxt = { workspace = true, optional = true, default-features = false }
regex = { workspace = true }
regex = { workspace = true, default-features = false }
hex = { workspace = true }
cfg-if = { workspace = true }
codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] }
sp-core-hashing = { workspace = true }
thiserror = { workspace = true }
pbkdf2 = { workspace = true }
sha2 = { workspace = true }
hmac = { workspace = true }
sp-core-hashing = { workspace = true, default-features = false }
derive_more = { workspace = true }
pbkdf2 = { workspace = true, default-features = false }
sha2 = { workspace = true, default-features = false }
hmac = { workspace = true, default-features = false }
zeroize = { workspace = true }
bip39 = { workspace = true }
schnorrkel = { workspace = true, optional = true }
secp256k1 = { workspace = true, features = ["recovery", "global-context"], optional = true }
bip39 = { workspace = true, default-features = false }
schnorrkel = { workspace = true, optional = true, default-features = false }
secp256k1 = { workspace = true, optional = true, default-features = false, features = ["alloc", "recovery"] }
secrecy = { workspace = true }


# We only pull this in to enable the JS flag for schnorrkel to use.
getrandom = { workspace = true, optional = true }

[dev-dependencies]
sp-core = { workspace = true, features = ["std"] }
sp-core = { workspace = true, default-features = false }
sp-keyring = { workspace = true }

[package.metadata.cargo-machete]
Expand Down
Loading
Loading