[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" } mtp-transport = { version = "0.1.0", path = "transport", optional = true } # --- 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", "transport"] # MTP client - outgoing QUIC connections to a host. client = ["dep:mtp-client", "transport"] # Opt into stream-specific host/client facade APIs. The transport itself is # always framed over QUIC/WebTransport streams for compatibility. streaming = [ "transport", "mtp-transport/streaming", "mtp-host?/streaming", "mtp-client?/streaming", ] # Direct access to the framed QUIC transport. Host/client features enable it # automatically; this feature is useful for low-level integrations. transport = ["dep:mtp-transport"] # 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"