From 8d7a56fbf8916baf2314f3c24f8d323081e94dad Mon Sep 17 00:00:00 2001 From: bchanot Date: Wed, 14 Oct 2026 21:56:53 +0200 Subject: [PATCH] docs(docs): RUST.md 8.6/8.7 module size after L1 and the JSON.stringify boundary invariant --- docs/development/RUST.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/development/RUST.md b/docs/development/RUST.md index f642c33c..f02cc4cf 100644 --- a/docs/development/RUST.md +++ b/docs/development/RUST.md @@ -574,7 +574,7 @@ Closed failure kinds: `invalid_json`, `invalid_shape`, `unknown_op`, | Measure | Value | |---|---| -| shipped module | 1,044,559 B raw (native), **340,154 B gzip -9** (budget 600 KB); before the by-reference deserialisation of the security follow-up: 1,180,153 B raw / 372,275 B served by the image | +| shipped module | 1,044,559 B raw (native), **340,154 B gzip -9** (budget 600 KB); before the by-reference deserialisation of the security follow-up: 1,180,153 B raw / 372,275 B served by the image; after L1 (no rewrite pass, ยง8.7): 1,040,784 B raw / 339,933 B gzip -9 | | glue | 10,171 B | | load (compile + instantiate) | 6 to 8 ms | | sheet handle + index data (bundle 0.5 MB) | 22 to 27 ms (TypeScript parse + index on the same input: 12 to 15 ms) | @@ -611,7 +611,11 @@ application itself builds. it was; the publish gate reads it as `invalid_shape`. Keeping such a string byte for byte would need a JSON reader of our own and a lossless string type across the contracts (rejected for R2, the refusal leaves - that door open: nothing is lost). + that door open: nothing is lost). Invariant of the boundary: callers pass + `JSON.stringify` output only, which escapes a lone surrogate as `\uXXXX`; + a raw JavaScript string handed to a wasm-bindgen `&str` parameter would be + re-encoded with U+FFFD before the core sees it. The `pretty_json` proof + op reads with serde_json directly and refuses such text as `invalid_json`. 2. Drafts and the attachment's report are written in contract order instead of insertion order (D-R11); values unchanged, the N-1 reader parses them. 3. An unreadable draft or archive is set aside under `osteo:quarantine:*`