skip to content
[readonly]
==> README.md <==
1# @ajax/mesh-toml
2
3The 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"`, ...).
4
5```c
6#include "mesh/toml.h"
7mesh_toml_val v;
8char *err = NULL;
9if (!mesh_toml_value("[\"a\", \"b\"]", 10, &v, &err)) ...
10```
11
12## Ported from
13
14[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`).
15
16## Tests
17
18Through @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.
19
20## Licence
21
22MIT. See the repository's LICENSE.