1# @ajax/mesh-abi-ops
23Task ops (task, init, req, follow, job) and their reserved results.
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/ops.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: OP_TASK, OP_INIT, OP_REQ, OP_FOLLOW, OP_JOB, R_JOB_FAIL, R_NONE, R_BAD_OP.
1617Names: Rust's `NAME` is `MESH_NAME`; a constant of a Rust module `m` is `MESH_M_NAME` (unless it already starts with `M_`); a function `f` is `mesh_f` (`mesh_m_f`). Offsets that are `usize` in the Rust are plain integer constants or `size_t` results, `u32` constants carry a `u` suffix, `u64` use `UINT64_C`.
1819## Device code
2021The 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.
2223## Tests
2425- `tests/constants.c`: every constant against the value the Rust prints (8 checks)
2627## Licence
2829MIT. See the repository's LICENSE.