mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 01:15:47 +00:00
make web and native features explicit in signer if subxt feature enabled
This commit is contained in:
+3
-3
@@ -15,7 +15,7 @@ description = "Sign extrinsics to be submitted by Subxt"
|
||||
keywords = ["parity", "subxt", "extrinsic", "signer"]
|
||||
|
||||
[features]
|
||||
default = ["sr25519", "ecdsa", "subxt", "native"]
|
||||
default = ["sr25519", "ecdsa", "subxt"]
|
||||
|
||||
# Pick the signer implementation(s) you need by enabling the
|
||||
# corresponding features. Note: I had more difficulties getting
|
||||
@@ -30,8 +30,8 @@ subxt = ["dep:subxt"]
|
||||
|
||||
# The getrandom package is used via schnorrkel. We need to enable the JS
|
||||
# feature on it if compiling for the web.
|
||||
web = ["getrandom/js", "subxt?/web"]
|
||||
native = ["subxt?/native"]
|
||||
web = ["getrandom/js", "subxt/web"]
|
||||
native = ["subxt/native"]
|
||||
|
||||
[dependencies]
|
||||
subxt = { workspace = true, optional = true, default-features = false }
|
||||
|
||||
+8
-2
@@ -39,5 +39,11 @@ pub use secrecy::{ExposeSecret, SecretString};
|
||||
// DeriveJunctions are the "path" part of these SecretUris.
|
||||
pub use crypto::{DeriveJunction, SecretUri, SecretUriError, DEV_PHRASE};
|
||||
|
||||
#[cfg(all(feature = "subxt", not(any(feature = "web", feature = "native"))))]
|
||||
compile_error!("subxt-signer: When using the 'subxt' feature, exactly one of the 'web' and 'native' features should be used.");
|
||||
#[cfg(all(
|
||||
feature = "subxt",
|
||||
any(
|
||||
all(feature = "web", feature = "native"),
|
||||
not(any(feature = "web", feature = "native"))
|
||||
)
|
||||
))]
|
||||
compile_error!("subxt-signer: exactly one of the 'web' and 'native' features should be used.");
|
||||
|
||||
@@ -14,8 +14,8 @@ serde_json = "1"
|
||||
# enable the "web" feature here but don't want it enabled as part
|
||||
# of workspace builds. Also disable the "subxt" feature here because
|
||||
# we want to ensure it works in isolation of that.
|
||||
subxt-signer = { path = "..", default-features = false, features = ["web", "sr25519", "ecdsa"] }
|
||||
subxt-signer = { path = "..", features = ["web"] }
|
||||
|
||||
# this shouldn't be needed, it's in workspace.exclude, but still
|
||||
# I get the complaint unless I add it...
|
||||
[workspace]
|
||||
[workspace]
|
||||
|
||||
Reference in New Issue
Block a user