Tins · Primitives
snappy
Snappy in pure Mojo — the raw block format and the CRC-32C-checksummed framing format. No FFI, no C dependency.
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 snappy-mojo --git https://github.com/magmalake/snappy.mojo --rev b8172ed0a4ef13911cc225d46e26676a5b8f1ccd No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.
Version
0.1.4 on mojoshelf
Source
What it does
Works today
- Raw block format and sNaPpY framing
- CRC-32C verified per chunk
- Pure Mojo — nothing to build, nothing to link
Correctness
Checked against Spec edge cases and round trips, and a block python-snappy produced, decoded