Methanium Transport Protocol
  • Rust 77.2%
  • TypeScript 15.6%
  • JavaScript 6.6%
  • Nix 0.4%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-22 23:29:18 +02:00
client Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
codec Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
common Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
crypto Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
example-usage Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
host Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
src Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
transport Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
type-map Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
.gitignore [WIP] Version Parsing 2026-06-22 14:39:18 +02:00
Cargo.toml Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
CONNECTOR.md Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
example-type-maps.yaml Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
README.md Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00
TYPE-MAP.md Values, Cleaning, Docs, Tests, Example (Current Example is Wrong) 2026-06-22 23:29:18 +02:00

Methanium Transport Protocol

MTP is a modular transport protocol by Methanium.

Getting Started

Add the mtp crate with your desired features:

[dependencies]
mtp = { path = "..", features = ["client", "crypto"] }

The mtp umbrella crate re-exports all sub-crates behind feature flags:

Feature Pulls in Enables
crypto mtp::crypto AEAD, signatures, KEM, KDF, hashing
host mtp::host, mtp::codec::registry QUIC server, version negotiation
client mtp::client QUIC client connections

Core crates (codec, transport, common, type_map) are always available.

use mtp::codec::{encode, decode, DataValue};
use mtp::type_map::TypeMap;
use mtp::transport::Sender;

#[cfg(feature = "crypto")]
use mtp::crypto::ChaCha20Poly1305;

Sub-crates

All sub-crates are re-exported through the mtp facade and can be referenced as mtp::codec, mtp::transport, mtp::common, mtp::type_map, mtp::crypto, mtp::host, mtp::client.

Codec

The Codec crate handles encoding and decoding of MTP packets using Communication Types and Data Types from the Registry.

Data Values:

  • Container
  • Encrypted Container (requires crypto feature)
  • Signed Integer
  • Unsigned Integer
  • Boolean
  • Signed Float
  • String
  • Array
  • Binary (List of Bytes)

Encoding/decoding uses a TypeMap to resolve type names to wire IDs.

The Codec uses the Crypto crate to encrypt and decrypt Encrypted Containers.


Transport

The Transport crate wraps QUIC using wtransport. It provides Sender/Receiver for bidirectional message passing over QUIC streams.

Common

Common handles logging and error handling. Personal information reported to Common will be anonymized.

Crypto Stack

Crate Audited? Notes
ml-dsa No NIST vectors pass; regression bug fixed Jan 2026
ed25519-dalek Yes Used by Signal, Diem
chacha20poly1305 Yes NCC Group audit, Dec 2019
aes-gcm Yes NCC Group audit, Dec 2019
hkdf No Simple construction; well-reviewed
sha2 No Standard construction; widely reviewed
zeroize No Simple; widely used
mlkem-tls No mlkem-rs backend unaudited