1# @ajax/mesh-toml
23The value syntax of `program.toml`: integers (decimal or `0x`, `_` separators), negative integers, floats (with a `.`), `"strings"` (no escapes), `true`/`false`, one-line lists of strings, and `#` comments outside strings. Not general TOML: exactly what the Rust's hand-rolled parser accepts, with its error messages (`unterminated string`, `bad value "x"`, ...).
45```c
6#include "mesh/toml.h"
7mesh_toml_val v;
8char *err = NULL;
9if (!mesh_toml_value("[\"a\", \"b\"]", 10, &v, &err)) ...
10```
1112## Ported from
1314[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/manifest.rs (`Val`, `value`, `quoted`, `int`, `pair`, `strip_comment`).
1516## Tests
1718Through @ajax/mesh-manifest-encode's golden test: 5696 manifests (every `program.toml` of the Rust repo, the Rust's test cases and mutations of every key) give the Rust's verdicts byte for byte.
1920## Licence
2122MIT. See the repository's LICENSE.