# thrift

> thrift, a magmalake tin: Apache Thrift serialization in pure Mojo — compact and binary protocols — plus every struct, union and enum of the Parquet metadata schema, generated ahead of time.

[magmalake](https://magmalake.dev/) [thrift](https://magmalake.dev/s/thrift)

Apache Thrift serialization in pure Mojo — compact and binary protocols — plus every struct, union and enum of the Parquet metadata schema, generated ahead of time.

Install

```
pixi shelf add thrift-mojo
```

Version

`0.1.3` on mojoshelf

Source

[GitHub](https://github.com/magmalake/thrift.mojo) [README](https://github.com/magmalake/thrift.mojo#readme) [Benchmark history](https://magmalake.github.io/thrift.mojo/benchmarks/)

## Works today

- TCompactProtocol and TBinaryProtocol behind one trait
- All of parquet.thrift, pre-generated
- Footer, page-header and page-index decode helpers
- No RPC, no runtime IDL, no dependencies

Checked against Apache Thrift itself — 13 generated wire vectors, byte-identical

Byte-identical to Apache Thrift on generated wire vectors, in both the compact and the binary protocol.

- [zstd](https://magmalake.dev/s/zstd) libzstd
- [lz4](https://magmalake.dev/s/lz4) liblz4
- [brotli](https://magmalake.dev/s/brotli) libbrotli
- [snappy](https://magmalake.dev/s/snappy) pure Mojo
- [deflate](https://magmalake.dev/s/deflate) DEFLATE · gzip · pure Mojo
- [hashes](https://magmalake.dev/s/hashes) CRC-32 · murmur3 · XXH64
- [memory-region](https://magmalake.dev/s/memory-region) bytes addressed by offset · shared mappings
- [threads](https://magmalake.dev/s/threads) pthreads · atomics · parallel\_for
- [Every tin](https://magmalake.dev/tins)

[A magmalake project](https://magmalake.dev/)

Apache 2.0 · © 2026 Marius Seritan
