# avro

> avro, a magmalake tin: Pure-Mojo Apache Avro: schema parsing, the binary encoding, Object Container Files both ways, and schema resolution.

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

Pure-Mojo Apache Avro: schema parsing, the binary encoding, Object Container Files both ways, and schema resolution. No FFI: its one dependency is deflate-mojo, for the deflate codec.

Install

mojoshelf:

```
pixi shelf add avro-mojo
```

`pixi shelf` comes with mojoshelf: [install it first](https://mojoshelf.org/getting-started).

plain pixi:

```
pixi init app -c https://conda.modular.com/max -c conda-forge && cd app
sed -i.bak 's/^\[workspace\]/[workspace]\npreview = ["pixi-build"]/' pixi.toml
pixi add "mojo-compiler==1.2.0"
# Without mojoshelf: the tin as a git dependency at its published commit.
# Transitive dependencies may be wrong: pixi takes the tin's own git deps as
# pinned in its pixi.toml, which may not match what other tins pin, and then
# fails with "duplicate records". mojoshelf picks revisions that agree.
pixi add avro-mojo --git https://github.com/magmalake/avro.mojo --rev db833d86ddbd7cbaba4dbd79377b0a06009181ec
```

No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.

Version

`0.4.4` on mojoshelf

Source

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

## Works today

- Object Container Files, read and write, null / deflate / snappy / zstandard
- A schema-compiled RecordCursor with no per-record allocation
- Iceberg field-ids and OCF metadata survive parsing intact

Checked against fastavro, both directions, across all four codecs

- [parquet](https://magmalake.dev/s/parquet) read · write · every encoding · Arrow out
- [parquet-full](https://magmalake.dev/s/parquet-full) parquet · plus ZSTD, BROTLI and LZ4
- [arrow-mlake](https://magmalake.dev/s/arrow-mlake) Arrow layout · C Data Interface · IPC
- [roaring](https://magmalake.dev/s/roaring) 32/64-bit · deletion vectors
- [Every tin](https://magmalake.dev/tins)

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

Apache 2.0 · © 2026 Marius Seritan
