Skip to main content

rusty_rtos_json/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2#![forbid(unsafe_code)]
3//! `rusty_rtos_json` — coreJSON remade in Rust.
4//!
5//! **The validator.** `JSON_Validate`, strict ECMA-404. It agrees with coreJSON
6//! v3.3.1 on all 318 files of JSONTestSuite and passes the suite outright
7//! (95/95 accepted, 188/188 rejected).
8//!
9//! **The query engine.** `JSON_SearchConst` and `JSON_Iterate`, diffed against
10//! the C over 2,124 queries and 348 iterations as a 3,089-line trace. A query
11//! returns a sub-slice of the buffer you already have: no tree, no copy.
12//!
13//! Zero allocation throughout, `no_std`, `forbid(unsafe)`, with a no-panic gate
14//! over both halves.
15//!
16//! **What is not here:** a serialiser, which coreJSON does not have either, and
17//! `JSON_SearchT`, which is a cast of `JSON_SearchConst` that exists only so C
18//! callers can pass a mutable buffer.
19//!
20//! This is the facade: it re-exports the `no_std` core. Depend on this crate;
21//! reach into the sub-crates only when you are building a port or a backend.
22//!
23//! Part of Kairos (Remade With Rust). Plan: `docs/plans/rusty_rtos_json.md`.
24
25pub use rusty_rtos_json_core::*;
26
27/// The names a firmware wants in scope.
28pub mod prelude {
29    pub use rusty_rtos_json_core::prelude::*;
30}