1# @ajax/mesh-abi-fnv
23FNV-1a 64, the hash of program images in the mesh contract.
45Part of the mesh contract: the memory, control, snapshot and peer protocols shared by meshd, its GPU
6programs (CUDA kernels, wasm lanes, native workers) and the tools. Every side compiles the same
7definitions, so an offset can never disagree.
89```c
10#include "mesh/abi/fnv.h"
11```
1213## Ported from
1415[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-abi/src/v2.rs (fnv1a64).
1617## Device code
1819The header is freestanding (`<stdint.h>`, `<stddef.h>`, `<stdbool.h>` only): it compiles for the host, `nvptx64-nvidia-cuda` and `wasm32`. Functions the Rust marks `const fn` are `static inline` here.
2021## Tests
2223- `tests/constants.c`: every constant against the value the Rust prints (0 checks), and 1 Rust const asserts that call functions
24- `tests/golden.c`: its functions against 6 vectors computed by the Rust on the same inputs
2526## Licence
2728MIT. See the repository's LICENSE.