Repository navigation
ontos v0.15.0
ontos v0.15.0
Two additive host APIs let consumers transfer owned tuple children and assemble
canonical tuple bytes from separately encoded children. The value model,
structural identity, codec bytes, and decoding limits are unchanged.
Rust: consume a tuple without cloning its children
Tuple::into_items(self) -> Vec<Value> transfers the existing child vector in
order. The tuple is consumed; its children keep their original storage and
stack-safe drop behavior, including when the returned iterator is only partly
consumed.
use ontos_core::{Tuple, Value};
let tuple = Tuple::new([Value::atom([0x61]), Value::atom([0x62])]);
for child in tuple.into_items() {
// Each child is owned independently and can be released after use.
assert!(child.is_atom());
}TypeScript: encode the canonical tuple header
encodeTupleHeader(arity) returns the tuple tag and shortest-form arity bytes,
using the same framing implementation as encode. It accepts the same
non-negative safe integers as encodeUvarint and throws RangeError otherwise.
It allocates only the header, with no placeholder children.
Append exactly arity complete canonical child encodings in order to obtain the
same bytes as encoding the whole tuple. The helper does not inspect children or
validate the assembled value; ordinary decoding still checks the complete value
and applies its existing limits.
Upgrade together
Every published package carries version 0.15.0. Keep all ontos dependencies in
one Rust graph on the same compatible crates.io version: a 0.13 or 0.14 core
and a 0.15 core define different Rust Value types. The TypeScript packages are
published to npmjs. See distribution for the package names
and installation examples.
The root Go tag v0.15.0 and nested tag projection/deixis/go/v0.15.0 name the
same release commit. The optional deixis projection still pins deixis 0.6.0;
consumers of core, codec, data, or data-json gain no deixis dependency.
The Rust ownership and TypeScript framing APIs are language-specific
conveniences. All four implementations retain the same frozen
ontos-codec-v1 byte mapping and shared conformance corpus.