Tins · File formats
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
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
What it does
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
Correctness
Checked against fastavro, both directions, across all four codecs
Also in File formats
- parquet read · write · every encoding · Arrow out
- parquet-full parquet · plus ZSTD, BROTLI and LZ4
- arrow-mlake Arrow layout · C Data Interface · IPC
- roaring 32/64-bit · deletion vectors
- Every tin