Tins · Primitives
hashes
The three hashes Iceberg and Parquet actually need — CRC-32, MurmurHash3 x86-32 and XXH64 — in pure Mojo, with no dependencies and no FFI.
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 hashes-mojo --git https://github.com/magmalake/hashes.mojo --rev 395aca597f9410bd0511df44d972f14b10a8b01d No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.
Version
0.1.3 on mojoshelf
Source
What it does
Works today
- CRC-32 for page CRCs and deletion-vector checksums
- MurmurHash3 for the Iceberg bucket[N] transform
- XXH64 for Parquet bloom filters
- Identical results on every platform
Correctness
Checked against zlib, mmh3 and xxhash, plus the Iceberg spec's Appendix B vectors