mtp/Cargo.toml
Alois a4447ebce8
All checks were successful
CI / checks (push) Successful in 4m46s
(fix): builds
2026-07-04 12:47:46 +02:00

91 lines
2.6 KiB
TOML

[workspace]
members = [
"common",
"crypto",
"type-map",
"codec",
"transport",
"host",
"client",
"wasm",
"files",
]
# `wasm` is a wasm32-only crate: it relies on web-sys unstable APIs
# (`--cfg=web_sys_unstable_apis`, set in wasm/.cargo/config.toml) and the
# wasm32 target. Cargo only reads .cargo/config.toml from the invocation
# directory and its ancestors, so building it for the host target from the
# workspace root fails. Exclude it from the default set so a bare
# `cargo build`/`test`/`clippy` at the root matches CI, which always uses
# `--exclude mtp-wasm`. Build it explicitly with:
# cargo build -p mtp-wasm --target wasm32-unknown-unknown
default-members = [
".",
"common",
"crypto",
"type-map",
"codec",
"transport",
"host",
"client",
"files",
]
resolver = "3"
# =============================================================================
# mtp - umbrella crate
#
# Re-exports all MTP sub-crates behind feature flags so consumers write:
#
# [dependencies]
# mtp = { version = "0.1", features = ["client", "crypto"] }
#
# instead of listing every sub-crate individually.
# =============================================================================
[package]
name = "mtp"
version = "0.1.0"
edition = "2024"
[dependencies]
# --- always-on core ---
mtp-common = { version = "0.1.0", path = "common" }
mtp-type-map = { version = "0.1.0", path = "type-map" }
mtp-codec = { version = "0.1.0", path = "codec" }
# --- optional, behind features ---
mtp-crypto = { version = "0.1.0", path = "crypto", optional = true, features = [
"serde",
"mlkem-tls",
] }
mtp-host = { version = "0.1.0", path = "host", optional = true }
mtp-client = { version = "0.1.0", path = "client", optional = true }
mtp-files = { version = "0.1.0", path = "files", optional = true }
[features]
default = []
# Serialization
serde = ["mtp-crypto/serde"]
# Message encryption (AEAD, signatures, KEM, KDF, hashing).
# When combined with `host` or `client`, also enables connection authentication.
crypto = [
"dep:mtp-crypto",
"mtp-codec/crypto",
"mtp-host?/crypto",
"mtp-client?/crypto",
]
# MTP server host - version negotiation, Registry, incoming QUIC connections.
host = ["dep:mtp-host", "mtp-codec/registry"]
# MTP client - outgoing QUIC connections to a host.
client = ["dep:mtp-client"]
# On-disk storage for keyrings (`.mk`) and public key bundles (`.mpkb`).
# Pulls in `crypto` so the `Keyring` / `PublicKeyBundle` types are in scope.
files = ["dep:mtp-files", "crypto"]
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
rcgen = "0.14"
rand = "0.8"