[workspace] members = [ "common", "crypto", "type-map", "codec", "transport", "host", "client", "wasm", "files", "mtp-webserver", ] # `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", "mtp-webserver", ] 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.3.0" edition = "2024" [dependencies] # --- always-on core --- mtp-common = { version = "0.3.0", path = "common" } mtp-type-map = { version = "0.3.0", path = "type-map" } mtp-codec = { version = "0.3.0", path = "codec" } # --- optional, behind features --- mtp-crypto = { version = "0.3.0", path = "crypto", optional = true, features = [ "serde", "mlkem-tls", ] } mtp-host = { version = "0.3.0", path = "host", optional = true } mtp-client = { version = "0.3.0", path = "client", optional = true } mtp-files = { version = "0.3.0", path = "files", optional = true } mtp-webserver = { version = "0.3.0", path = "mtp-webserver", optional = true } mtp-transport = { version = "0.3.0", path = "transport", optional = true } [features] # 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-webserver?/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"] # 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"] # Direct access to the pipes. Pipes can be used to send raw binary # without after creation overhead. pipes = ["mtp-common/pipes", "mtp-codec/pipes", "mtp-transport?/pipes", "mtp-host?/pipes", "mtp-client?/pipes", "mtp-webserver?/pipes"] # 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"] # Development/migration-only access to the legacy plaintext keyring format. # Production users should use the Argon2id-protected `.mk` APIs instead. raw = ["mtp-files?/raw"] # HTTP/3 routing and WebTransport-based MTP hosting on one QUIC endpoint. web-server = ["dep:mtp-webserver", "dep:mtp-host", "mtp-codec/registry", "transport"] # Complete native server surface. full-server = ["host", "web-server", "crypto", "pipes"] # Self-signed certificate generation helper (requires crypto). tls = ["crypto", "mtp-crypto?/tls"] # Insecure TLS certificate verification (development only). # Requires MTP_INSECURE_TLS=1 at runtime. insecure-tls = ["dep:mtp-transport", "mtp-transport?/insecure-tls"] [package.metadata.cargo-machete] ignored = ["mtp-transport"]