# mars-schema: nice-to-have follow-ups

- **Smaller `.wasm`** (`crates/mars-schema`, `scripts/build-schema-wasm.sh`): two cuts remain.
  - Read manifests only through `toml_edit` and drop the `toml` crate (about 36 KB). This changes TOML error text, which is part of the fixture contract.
  - Replace the `yaml_rust2` structural event scan (about 92 KB) with checks on the `serde_yaml` value.
  - `wasm-opt -Oz` is not used, because it would make the build depend on Binaryen being installed.
- **Integer-like mapping keys** (`npm/@meridian-flow/mars-schema/index.d.ts`): a JS object always lists keys like `"1"` first, so their file order is lost across the WASM boundary. The fix is a pairs array for mappings in readings, which changes the JS contract.
- **`frontmatter.too-deep` counts raw brackets** (`src/frontmatter.rs`): more than 64 `[`/`{` inside a quoted string would be a false refusal. The fix is to count only outside quoted scalars.
- **NUL in tree paths** (`src/tree.rs` `FileTree::insert`): a NUL in a path component is accepted. That is harmless on disk; refuse it if a caller stores paths where NUL matters.
