nx_value.nx
buildroot/runtime/nx_value.nx
about
nx_value.nx -- shape-free tagged tree representation.
module: nishi-core.data.value
depends: nishi-core.io.syscalls
disk_kb: 4
capability: CORE_IO
wired_status: FULLY_WIRED
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: json_data_model_rfc_8259 +
s_expression_lisp_cons_cell_tradition +
nishi_build_the_system_cardinal_2026 +
nishi_no_skipping_build_the_missing_dependency
THE shape-free representation any structured data parses INTO.
Brick #1 of the bits-up ingestion stack:
bytes
-> nx_value_parse_json -> NxValue tree (Brick #2)
-> nx_value_parse_csv -> NxValue tree (queued)
-> nx_value_parse_xml -> NxValue tree (queued)
NxValue tree
-> nx_shape_descriptor -> SHAPE record (Brick #3, queued)
-> nx_canonical_map -> substrate record (Brick #5, queued)
No upstream-source-specific parsing happens at this layer. The
tree carries WHATEVER the source emitted; later passes interrogate
shape + map to canonical fields.
dependencies 1 imports · 6 importers
imports: syscalls.nx
imported by: nx_ingest_batch.nxnx_value_parse_csv.nxnx_value_parse_csv_test.nxnx_value_parse_json.nxnx_value_parse_json_test.nxnx_value_test.nx
structs
| 68 | struct NxValue |
consts
| 35 | const NX_VAL_NULL: i64 = 1 |
| 36 | const NX_VAL_BOOL: i64 = 2 |
| 37 | const NX_VAL_INT: i64 = 3 |
| 38 | const NX_VAL_FLOAT: i64 = 4 // Q10 fixed-point per substrate convention |
| 39 | const NX_VAL_STRING: i64 = 5 |
| 40 | const NX_VAL_ARRAY: i64 = 6 |
| 41 | const NX_VAL_OBJECT: i64 = 7 |
| 79 | const NX_VALUE_BYTES: i64 = 64 // 8 fields * 8 bytes |
| 180 | const NX_VALUE_MAX_KEY_COMPARE: i64 = 16384 |
| 206 | const NX_VALUE_MAX_OBJECT_KEYS: i64 = 65536 |
functions
| 43 | func nx_val_kind_name(k: i64) -> *u8 |
| 83 | func nx_value_new_null() -> *NxValue |
| 97 | func nx_value_new_bool(b: i64) -> *NxValue |
| 105 | func nx_value_new_int(n: i64) -> *NxValue |
| 112 | func nx_value_new_float_q10(q10: i64) -> *NxValue |
| 119 | func nx_value_new_string(ptr: *u8, len: i64) -> *NxValue |
| 127 | func nx_value_new_array(items: **NxValue, count: i64) -> *NxValue |
| 135 | func nx_value_new_object( |
| 152 | func nx_value_kind(v: *NxValue) -> i64 called by 1: main |
| 157 | func nx_value_is_null(v: *NxValue) -> i64 called by 1: main |
| 163 | func nx_value_array_len(v: *NxValue) -> i64 |
| 171 | func nx_value_array_get(v: *NxValue, idx: i64) -> *NxValue |
| 182 | func nx_value_bytes_equal(a: *u8, an: i64, b: *u8, bn: i64) -> i64 |
| 208 | func nx_value_object_get(v: *NxValue, key: *u8, key_len: i64) -> *NxValue |
| 236 | func nx_value_object_index_of(v: *NxValue, key: *u8, key_len: i64) -> i64 |
| 264 | func nx_value_object_get_string( |
| 283 | func nx_value_object_get_int( |