Thalassa
Description
Implementation of the TLS presentation language data format defined in RFC8446. Mostly cares about what MLS (RFC9420) cares about, eventually we'll cover the entirety of the spec to support other TLS-PL usecases (like, uh, TLS).
The killer feature compared to other crates is zero-copy deserialization.
This includes a derive proc macro heavily inspired by tls_codec, with a feature focus on discriminant related attributes - which I contributed to.
Compatible with WASM.
Documentation
Here: https://docs.rs/thalassa
Roadmap
- Make E2E interop tests with
tls_codec- DO NOT USE this crate until this is done. - Actually manage to benchmark the real performance? Despite my best efforts, I get numbers in the range of 500TB/s on deserialization, which absolutely doesn't sound right.
- "Distant variant" feature on the derive
- This basically allows to de/serialize Rust enums as TLSPL variants, but allowing to use a discriminant not immediately preceding the variant contents, which is currently a requirement (as with
tls_codec). This is extremely common in protocols making use of TLSPL, such as MLS, MIMI or keytrans.
- This basically allows to de/serialize Rust enums as TLSPL variants, but allowing to use a discriminant not immediately preceding the variant contents, which is currently a requirement (as with
- Billion Laughs protection (recursion depth tracking)
- Serde compat
- Facet compat (maybe?)
- Docs improvements, examples, etc
AI Disclaimer
Unlike a lot of things being created currently, this library was written WITHOUT the use of any LLM.
Acknowledgements
- tls_codec for the derive inspiration
License
Licensed under either of these:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)