Add unknown ranges and open object values

This commit is contained in:
2026-08-14 08:00:22 +09:00
parent 8c50dd202d
commit 848c7f169f
53 changed files with 9047 additions and 6572 deletions
+4 -2
View File
@@ -9,7 +9,8 @@ It is designed around a lightweight Rust library:
- no filesystem access in the library core
- concrete and abstract values with constraints and defaults
- asymmetric range refinement with `narrower as wider`
- homogeneous associative-array schemas with `{...valueSchema}`
- homogeneous associative-array schemas with `{...valueSchema}` and object rest constraints
- the safe top range `Unknown`, which remains abstract until refined, defaulted, or supplied concretely
- deterministic expression evaluation
- optional regex support behind a Cargo feature
- browser playground support through WebAssembly
@@ -26,6 +27,7 @@ decodal = "0.3.0"
## Derive support
For embedded Rust applications, Decodal can generate a schema and typed decoder from a Rust struct with the `derive` feature.
Map fields marked with `#[decodal(rest)]` receive additional object fields; `BTreeMap<String, Data>` corresponds to `...Unknown`.
```toml
[dependencies]
@@ -47,7 +49,7 @@ struct Service {
The derive implements:
- `DecodalSchema`, which produces a host schema for `Engine::bind_global`
- `DecodalSchema`, which produces a `Value` range for `Engine::bind_global`
- `DecodalDecode`, which converts materialized `Data` into the Rust struct
## CLI