skip to content
[readonly]
==> README.md <==
1# @ajax/mesh-abi
2
3The whole mesh contract in one include, for code ported from Rust's `use mesh_abi::v2::*`:
4
5```c
6#include "mesh/abi.h"
7```
8
9It includes every `@ajax/mesh-abi-*` package and holds the Rust const asserts that span more than one of
10them (`_Static_assert`s in the header; the ones that call functions run in `tests/layout.c`). New code should
11depend on the atomic packages it actually uses instead.
12
13## Ported from
14
15[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): `crates/mesh-abi`
16(`lib.rs`, `v2.rs`, `v2/pipe.rs`, `v2/views.rs`, `v2/wasm.rs`). docs/port/abi.md maps every Rust item to its
17C package.
18
19## Tests
20
21- `tests/layout.c`: the cross-package Rust const asserts that call functions (55), the FRAMES guard (ids
22  dense 1..=32), and the Rust's `layout_tests::regions_have_no_aliased_fields` over all 13 field tables.
23- @ajax/mesh-abi-ptx-check and @ajax/mesh-abi-wasm-check build the whole contract for nvptx64 and wasm32.
24
25## Device code
26
27Freestanding: compiles for the host, `nvptx64-nvidia-cuda` and `wasm32`.
28
29## Licence
30
31MIT. See the repository's LICENSE.