skip to content
==> README.md <==
1# @ajax/mesh-manifest
2
3A program's manifest, `program.toml`: the `mesh_manifest` struct, `mesh_manifest_parse` with every key, default and refusal in the Rust's order and with its messages, `mesh_manifest_load` (a dir or its `program.toml`, and the `<name>.ptx` path), the placement parts, and a Debug printer that writes exactly what Rust's derived `{:?}` writes.
4
5```c
6#include "mesh/manifest.h"
7mesh_manifest m;
8char *err = NULL;
9if (!mesh_manifest_parse(text, strlen(text), &m, &err)) { puts(err); /* line 3: unknown key "bogus" */ }
10```
11
12## Differences
13
14None in behaviour. Type names carry the `mesh_manifest_` prefix (`mesh_manifest_field`, `mesh_manifest_place`, ...) so they never collide with the contract's `mesh_field`.
15
16## Ported from
17
18[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/manifest.rs (`Manifest`, `Field`, `Window`, `Place`, `Inbox`, `parse`, `load`).
19
20## Tests
21
22@ajax/mesh-manifest-encode's golden test: 5696 manifests against the Rust, comparing the verdict, the error text, the `{:?}` of the parsed manifest, the encoded entry and extension, and the place parts.
23
24## Licence
25
26MIT. See the repository's LICENSE.