rings-node 0.20.0

Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.
Documentation
[package]
name = "rings-node"
default-run = "rings"
description = """
Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.
"""
readme = "README.md"
keywords = ["Chord", "DHT", "Web3", "P2P", "WASM"]
categories = ["network-programming", "cryptography", "wasm"]
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true

[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["node_default"]
ffi = [
    "node",
    "cbindgen",
]
node_default = ["node"]
node = [
    "tokio",
    "tokio-util",
    "tower-http",
    "clap",
    "dep:reqwest",
    "reqwest/json",
    "reqwest/rustls-tls",
    "form_urlencoded",
    "pin-project",
    "async-stream",
    "backtrace",
    "lazy_static",
    "axum/ws",
    "rings-core/default",
    "dep:rings-gateway",
    "rings-rpc/std",
    "rings-derive/default",
    "rings-transport/native-webrtc",
    "home",
]

browser_default = ["browser"]
browser = [
    "backtrace",
    "clap",
    "tracing-wasm",
    "dep:reqwest",
    "reqwest/json",
    "rings-core/wasm",
    "rings-rpc/wasm",
    "rings-derive/wasm",
    "rings-transport/web-sys-webrtc",
    "serde-wasm-bindgen",
    "lazy_static",
    "wasm-bindgen",
    "wasm-bindgen-futures",
    "js-sys",
    "web-sys",
]
browser_chrome_test = ["browser_default"]

[dependencies]
anyhow = "1.0.45"
arrayref = "=0.3.9"
async-trait = { workspace = true }
base58 = "0.2"
base64 = { version = "0.13.0" }
bytes = { version = "1.2.1", features = ["serde"] }
chrono = "0.4.23"
dashmap = "5"
dotenvy = "0.15.7"
futures = { version = "0.3.21", features = ["alloc"] }
futures-timer = "3.0.2"
jsonrpc-core = { workspace = true }
log = { version = "0.4", features = ["std"] }
rand = { version = "0.8.5", features = ["getrandom"] }
rings-codec = { workspace = true }
rings-core = { workspace = true, optional = true }
rings-derive = { workspace = true, optional = true }
rings-measure = { workspace = true }
rings-rpc = { workspace = true, optional = true }
rings-transport = { workspace = true }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.70"
serde_yaml = "0.9.17"
strum = "0.25.0"
thiserror = "1"
tracing = "0.1.37"
tracing-log = "0.1.3"
tracing-subscriber = { version = "0.3.15", features = ["ansi", "env-filter"] }
uuid = { version = "0.8.2" }

# node
async-stream = { version = "0.3.2", optional = true }
axum = { version = "0.8.9", optional = true }
backtrace = { version = "0.3.6", optional = true }
clap = { version = "4.0.14", features = ["derive", "env"], optional = true }
form_urlencoded = { version = "1.0.1", optional = true }
home = { version = "0.5.5", optional = true }
lazy_static = { version = "1.4.0", optional = true }
pin-project = { version = "1", optional = true }
reqwest = { version = "0.12.22", optional = true, default-features = false }
tokio = { version = "1.13.0", features = ["io-std", "io-util", "macros", "net", "rt", "rt-multi-thread", "signal", "sync", "time"], optional = true }
tokio-util = { version = "0.7.8", optional = true }
tower-http = { version = "0.6.11", features = ["cors"], optional = true }

# browser
console_error_panic_hook = { version = "0.1.1", optional = true }
flate2 = "1.0"
js-sys = { workspace = true, optional = true }
serde-wasm-bindgen = { workspace = true, optional = true }
tracing-wasm = { version = "0.2.1", optional = true }
wasm-bindgen = { workspace = true, features = ["serde-serialize"], optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
web-sys = { version = "0.3.64", optional = true, features = [
    "WebTransport",
    "WebTransportOptions",
    "WebTransportBidirectionalStream",
    "WebTransportReceiveStream",
    "WebTransportSendStream",
    "WebTransportDatagramDuplexStream",
    "ReadableStream",
    "ReadableStreamDefaultReader",
    "ReadableStreamReadResult",
    "WritableStream",
    "WritableStreamDefaultWriter",
    "AbortController",
    "AbortSignal",
] }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
rings-gateway = { workspace = true, optional = true }

[dev-dependencies]
smoltcp = { version = "0.14.0", default-features = false, features = [
    "std",
    "medium-ip",
    "proto-ipv4",
    "socket-tcp",
] }
wasm-bindgen-test = { workspace = true }

[target.'cfg(target_os = "linux")'.dev-dependencies]
libc = "0.2"

[build-dependencies]
cbindgen = { version = "0.29.4", optional = true }

[[bin]]
name = "rings"
path = "bin/rings.rs"
required-features = ["node"]

[package.metadata.wasm-pack.profile.release]
wasm-opt = false