# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91"
name = "iroh-base"
version = "1.0.1"
authors = ["n0 team"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "base type and utilities for Iroh"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/n0-computer/iroh"
resolver = "2"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "iroh_docsrs",
]

[package.metadata.cargo_check_external_types]
allowed_external_types = [
    "n0_error::*",
    "serde_core::*",
    "url::*",
]

[features]
default = ["relay"]
key = [
    "dep:curve25519-dalek",
    "dep:ed25519-dalek",
    "dep:url",
    "dep:derive_more",
    "dep:data-encoding",
    "dep:data-encoding-macro",
    "dep:rand",
    "dep:getrandom",
    "dep:zeroize",
    "relay",
]
relay = [
    "dep:url",
    "dep:derive_more",
]

[lib]
name = "iroh_base"
path = "src/lib.rs"

[dependencies.curve25519-dalek]
version = "=5.0.0-rc.0"
features = [
    "serde",
    "rand_core",
    "zeroize",
]
optional = true

[dependencies.data-encoding]
version = "2.6.0"
optional = true

[dependencies.data-encoding-macro]
version = "0.1.19"
optional = true

[dependencies.derive_more]
version = "2.0.1"
features = [
    "debug",
    "display",
]
optional = true

[dependencies.ed25519-dalek]
version = "=3.0.0-rc.0"
features = [
    "serde",
    "rand_core",
    "zeroize",
]
optional = true

[dependencies.n0-error]
version = "1.0.0"

[dependencies.rand]
version = "0.10"
optional = true

[dependencies.serde]
version = "1"
features = [
    "derive",
    "rc",
]

[dependencies.url]
version = "2.5.3"
features = ["serde"]
optional = true

[dependencies.zeroize]
version = "1.9"
features = ["derive"]
optional = true

[dev-dependencies.postcard]
version = "1"
features = ["use-std"]

[dev-dependencies.proptest]
version = "1.11.0"

[dev-dependencies.rand_chacha]
version = "0.10"

[dev-dependencies.serde_json]
version = "1"

[dev-dependencies.serde_test]
version = "1"

[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies.getrandom]
version = "0.4"
features = ["wasm_js"]
optional = true

[lints.clippy]
unused-async = "warn"

[lints.rust]
missing_debug_implementations = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(iroh_docsrs)",
    "cfg(iroh_loom)",
    "cfg(skip_patchbay)",
]
