A program's manifest (program.toml): the struct, the parser and every validation, with the Rust's error messages
$ sexc add @ajax/mesh-manifest- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 02:56v/# 1 version
- drwxr-xr-x-Oct 27 02:56files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 02:56 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-text ^0.1.0, @ajax/mesh-toml ^0.1.0, @ajax/mesh-manifest-needs ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-abi-backend ^0.1.0, @ajax/mesh-abi-program-table ^0.1.0, @ajax/mesh-abi-control-block ^0.1.0, @ajax/mesh-abi-ring ^0.1.0, @ajax/mesh-abi-view-heap ^0.1.0, @ajax/mesh-abi-input-queue ^0.1.0, @ajax/mesh-abi-ext ^0.1.0, @ajax/mesh-abi-placement ^0.1.0, @ajax/mesh-abi-peer-sizes ^0.1.0, @ajax/mesh-abi-pipe-ring ^0.1.0, @ajax/mesh-abi-name ^0.1.0, @ajax/mesh-abi-node ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-backend, @ajax/mesh-driver, @ajax/mesh-exec-wasm, @ajax/mesh-inferd, @ajax/mesh-inproc, @ajax/mesh-load-text, @ajax/mesh-loader, @ajax/mesh-manifest-encode, @ajax/mesh-mps, @ajax/mesh-native, @ajax/mesh-native-limits, @ajax/mesh-prog-table, @ajax/mesh-publish, @ajax/mesh-snapshot
- keywords
- mesh alphaos manifest program parser
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-manifest
- repository
- https://github.com/thomasdavis/alpha-c-mesh
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.