[package] name = "iroh-base" version = "0.28.0" edition = "2021" readme = "README.md" description = "base type and utilities for Iroh" license = "MIT OR Apache-2.0" authors = ["n0 team"] repository = "https://github.com/n0-computer/iroh" # Sadly this also needs to be updated in .github/workflows/ci.yml rust-version = "1.76" [lints] workspace = true [dependencies] anyhow = { version = "1" } blake3 = { version = "1.4.5", package = "iroh-blake3", optional = true } data-encoding = { version = "2.3.3", optional = true } hex = "0.4.3" postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"], optional = true } redb = { version = "2.0.0", optional = true } serde = { version = "1", features = ["derive"] } thiserror = "1" # key module aead = { version = "0.5.2", features = ["bytes"], optional = true } derive_more = { version = "1.0.0", features = ["debug", "display", "from_str"], optional = true } ed25519-dalek = { version = "2.0.0", features = ["serde", "rand_core"], optional = true } once_cell = { version = "1.18.0", optional = true } rand = { version = "0.8", optional = true } rand_core = { version = "0.6.4", optional = true } ssh-key = { version = "0.6.0", features = ["ed25519", "std", "rand_core"], optional = true } ttl_cache = { version = "0.5.1", optional = true } crypto_box = { version = "0.9.1", features = ["serde", "chacha20"], optional = true } zeroize = { version = "1.5", optional = true } url = { version = "2.5.0", features = ["serde"], optional = true } # wasm getrandom = { version = "0.2", default-features = false, optional = true } [dev-dependencies] iroh-test = "0.27.0" proptest = "1.0.0" serde_json = "1.0.107" serde_test = "1.0.176" [features] default = ["hash", "base32"] hash = ["dep:blake3", "dep:data-encoding", "dep:postcard", "dep:derive_more", "base32"] base32 = ["dep:data-encoding", "dep:postcard"] redb = ["dep:redb"] key = ["dep:ed25519-dalek", "dep:once_cell", "dep:rand", "dep:rand_core", "dep:ssh-key", "dep:ttl_cache", "dep:aead", "dep:crypto_box", "dep:zeroize", "dep:url", "dep:derive_more", "dep:getrandom"] wasm = ["getrandom?/js"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "iroh_docsrs"]