code wiki / (root) / nx_value.nx

nx_value.nx

buildroot/runtime/nx_value.nx

9135 B295 linesdepth 3pulls 3 transitivereach 8 importersview sourcekind librarytopic value
docsdependenciesstructsconstsfunctions

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

syscalls.nx nx_value.nx nx_ingest_batch.nx nx_value_parse_csv.nx nx_value_parse_csv_test.nx nx_value_parse_json.nx nx_value_parse_json_test.nx nx_value_test.nx

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

68struct NxValue

consts

35const NX_VAL_NULL: i64 = 1
36const NX_VAL_BOOL: i64 = 2
37const NX_VAL_INT: i64 = 3
38const NX_VAL_FLOAT: i64 = 4 // Q10 fixed-point per substrate convention
39const NX_VAL_STRING: i64 = 5
40const NX_VAL_ARRAY: i64 = 6
41const NX_VAL_OBJECT: i64 = 7
79const NX_VALUE_BYTES: i64 = 64 // 8 fields * 8 bytes
180const NX_VALUE_MAX_KEY_COMPARE: i64 = 16384
206const NX_VALUE_MAX_OBJECT_KEYS: i64 = 65536

functions

43func nx_val_kind_name(k: i64) -> *u8
83func nx_value_new_null() -> *NxValue
97func nx_value_new_bool(b: i64) -> *NxValue
105func nx_value_new_int(n: i64) -> *NxValue
112func nx_value_new_float_q10(q10: i64) -> *NxValue
119func nx_value_new_string(ptr: *u8, len: i64) -> *NxValue
127func nx_value_new_array(items: **NxValue, count: i64) -> *NxValue
135func nx_value_new_object(
152func nx_value_kind(v: *NxValue) -> i64
called by 1: main
157func nx_value_is_null(v: *NxValue) -> i64
called by 1: main
163func nx_value_array_len(v: *NxValue) -> i64
called by 3: mainmainmain
171func nx_value_array_get(v: *NxValue, idx: i64) -> *NxValue
182func nx_value_bytes_equal(a: *u8, an: i64, b: *u8, bn: i64) -> i64
208func nx_value_object_get(v: *NxValue, key: *u8, key_len: i64) -> *NxValue
236func nx_value_object_index_of(v: *NxValue, key: *u8, key_len: i64) -> i64
called by 1: main calls 1: nx_value_bytes_equal
264func nx_value_object_get_string(
called by 3: mainmainmain calls 1: nx_value_object_get
283func nx_value_object_get_int(
called by 2: mainmain calls 1: nx_value_object_get