Files
pezkuwi-subxt/lightclient/Cargo.toml
T
James Wilson b069c4425a Rework light client (#1475)
* WIP second pass over light client code for simpler API

* First pass new light client

* pub(crate) LightClientRpc::new_raw(), and fmt

* Update examples and add back a way to configure boot nodes and fetch chainspec from a URL

* Fix light client examples

* remove unused deps and tidy lightclient feature flags

* fix wasm error

* LightClientRpc can be cloned

* update light client tests

* Other small fixes

* exclude mod unless jsonrpsee

* Fix wasm-lightclient-tests

* add back docsrs bit and web+native feature flag compile error

* update book and light client example names

* fix docs
2024-03-15 15:21:06 +00:00

78 lines
2.0 KiB
TOML

[package]
name = "subxt-lightclient"
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
publish = true
license.workspace = true
readme = "../README.md"
repository.workspace = true
documentation.workspace = true
homepage.workspace = true
description = "Light Client for chain interaction"
keywords = ["parity", "substrate", "blockchain"]
[lints]
workspace = true
[features]
default = ["native"]
# Enable this for native (ie non web/wasm builds).
# Exactly 1 of "web" and "native" is expected.
native = [
"smoldot-light/std",
"tokio/rt",
]
# Enable this for web/wasm builds.
# Exactly 1 of "web" and "native" is expected.
web = [
"getrandom/js",
"smoldot/std",
# For the light-client platform.
"wasm-bindgen-futures",
"futures-timer/wasm-bindgen",
"instant/wasm-bindgen",
"pin-project",
# For websocket.
"js-sys",
"send_wrapper",
"web-sys",
"wasm-bindgen",
]
[dependencies]
futures = { workspace = true, features = ["async-await"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["default", "raw_value"] }
thiserror = { workspace = true }
tracing = { workspace = true }
smoldot-light = { workspace = true }
tokio-stream = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
futures-util = { workspace = true }
# Only needed for web
js-sys = { workspace = true, optional = true }
send_wrapper = { workspace = true, optional = true }
web-sys = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
smoldot = { workspace = true, optional = true }
pin-project = { workspace = true, optional = true }
futures-timer = { workspace = true, optional = true }
instant = { workspace = true, optional = true }
getrandom = { workspace = true, optional = true }
[package.metadata.docs.rs]
defalt-features = true
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.playground]
defalt-features = true