Skip to content

Commit

Permalink
Make tangle-subxt no_std compatible (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA authored Sep 3, 2024
1 parent 6d73726 commit 02f79ca
Show file tree
Hide file tree
Showing 6 changed files with 13,029 additions and 16,990 deletions.
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.

21 changes: 18 additions & 3 deletions tangle-subxt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tangle-subxt"
version = "0.1.6"
version = "0.2.0"
description = "Rust bindings and interface to interact with Tangle Network using subxt"
authors = { workspace = true }
edition = { workspace = true }
Expand All @@ -15,6 +15,21 @@ readme = "README.md"
[dependencies]
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }
subxt = { version = "0.37.0", default-features = false, features = ["jsonrpsee", "native"] }
subxt-signer = { version = "0.37.0", default-features = false, features = ["subxt", "sr25519", "ecdsa", "std"] }
subxt = { version = "0.37.0", default-features = false, features = ["jsonrpsee"], optional = true }
subxt-signer = { version = "0.37.0", default-features = false, features = ["subxt", "sr25519", "ecdsa"] }
serde = { workspace = true, features = ["derive"] }
subxt-core = "0.37.0"

[features]
default = ["std", "subxt/native"]
std = [
"dep:subxt",
"subxt/jsonrpsee",
"subxt-signer/std"
]
web = [
"dep:subxt",
"subxt/jsonrpsee",
"subxt/web",
"subxt-signer/web"
]
1 change: 1 addition & 0 deletions tangle-subxt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ subxt metadata -f bytes > ./metadata/tangle-testnet-runtime.scale

```bash
subxt codegen --file metadata/tangle-testnet-runtime.scale \
--crate "::subxt_core" \
--derive Clone \
--derive Eq \
--derive PartialEq \
Expand Down
Binary file modified tangle-subxt/metadata/tangle-testnet-runtime.scale
Binary file not shown.
4 changes: 4 additions & 0 deletions tangle-subxt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
pub mod tangle_testnet_runtime;
pub use parity_scale_codec;
pub use scale_info;
#[cfg(any(feature = "std", feature = "web"))]
pub use subxt;
pub use subxt_signer;
// `subxt` already re-exports `subxt-core`
#[cfg(not(any(feature = "std", feature = "web")))]
pub use subxt_core;
Loading

0 comments on commit 02f79ca

Please sign in to comment.