code wiki / (root) / nx_runtime.nx

nx_runtime.nx

buildroot/runtime/nx_runtime.nx

4693 B185 linesdepth 2pulls 2 transitivereach 1067 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

runtime.nx -- core NishiLang runtime. Intended to be used via copy-paste or future module-import. All routines here call only __syscall for their primitives; no libc. Contents: * Arena allocator (bump pointer, never frees) * strlen / strcmp / strneq / memcpy / memset * itoa / atoi (base 10 and hex) * print / println helpers using syscall write to stdout * die() -- print message + exit(1)

dependencies 1 imports · 268 importers

nx_syscalls.nx nx_runtime.nx _offc_gap3_repro_v2.nx _offc_gap3_repro_v3.nx _pp_minimal2.nx nx_5wh_log.nx nx_a11y_check.nx nx_a11y_check_test.nx nx_aces_native.nx nx_answer.nx nx_answer_test.nx nx_atp_to_derive.nx

diagram shows first 10 each side; +0 more imports, +258 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: _offc_gap3_repro_v2.nx_offc_gap3_repro_v3.nx_pp_minimal2.nxnx_5wh_log.nxnx_a11y_check.nxnx_a11y_check_test.nxnx_aces_native.nxnx_answer.nxnx_answer_test.nxnx_atp_to_derive.nxnx_atp_to_derive_test.nxnx_attack_taxonomy.nxnx_attack_taxonomy_test.nxnx_avatar_encode.nxnx_avatar_encode_test.nxnx_avatar_solve_test.nxnx_avatar_split.nxnx_avatar_split_test.nxnx_backward_subsume_test.nxnx_batch_audit_sidecar.nxnx_batch_audit_sidecar_test.nxnx_batch_infer.nxnx_bench_hll_throughput.nxnx_bench_hll_vs_datasketches.nxnx_bench_popcount.nxnx_bitstream.nxnx_bundle_gen.nxnx_calibration.nxnx_cap_harvest.nxnx_caplab_cities_test.nxnx_caplab_compete_test.nxnx_caplab_finance_test.nxnx_caplab_market_test.nxnx_caplab_products_test.nxnx_caplab_quality_test.nxnx_caplab_sim_test.nxnx_caplab_supply_test.nxnx_casc_bench.nxnx_casc_runner_test.nxnx_catalog_id_lookup.nxnx_clause_components.nxnx_clause_components_test.nxnx_clause_weight_test.nxnx_conformal.nxnx_congruence_closure.nxnx_container_bench.nxnx_container_census.nxnx_container_compose.nxnx_container_registry.nxnx_container_spec_emit.nxnx_coq_dir_ingest.nxnx_corpus_to_meta.nxnx_daemon_bench.nxnx_dashboard.nxnx_dashboard_test.nxnx_deflate.nxnx_deflate_huffman_test.nxnx_demodulation.nxnx_demodulation_test.nxnx_diagram.nxnx_diagram_test.nxnx_director_pipeline.nxnx_director_pipeline_test.nxnx_discount_test.nxnx_disctree.nxnx_disctree_test.nxnx_domain_profile.nxnx_emit_journal.nxnx_eq_factor.nxnx_eq_factor_test.nxnx_file_result.nxnx_file_result_test.nxnx_finger_count.nxnx_fmb.nxnx_fmb_test.nxnx_fof.nxnx_fof_cnf.nxnx_fof_cnf_test.nxnx_fof_parse.nxnx_fof_parse_test.nxnx_fof_tseitin.nxnx_fof_tseitin_test.nxnx_gpu_bench.nxnx_gzip_inflate_kat_test.nxnx_gzip_wrap.nxnx_hol_dir_ingest.nxnx_html_emit.nxnx_html_emit_test.nxnx_https_redirect_test.nxnx_huffman.nxnx_hyperres.nxnx_hyperres_test.nxnx_image_grade_cli.nxnx_image_grade_v0.nxnx_image_grade_v1.nxnx_image_grade_v2.nxnx_indexed_subsume_test.nxnx_inflate_kat_test.nxnx_ingest_at_scale.nxnx_inst_gen.nx +168 more (shown cap 100 declared)

structs

30struct Arena

consts

none

functions

36func arena_new(size: i64) -> *Arena
calls 1: sys_mmap
47func arena_alloc(a: *Arena, n: i64) -> *u8
61func strlen(s: *u8) -> i64
68func strneq(a: *u8, b: *u8, n: i64) -> i64
78func streq(a: *u8, b: *u8) -> i64
called by 1: prop_process_queue calls 2: strlenstrneq
85func memcpy(dst: *u8, src: *u8, n: i64) -> i64
94func memset(dst: *u8, v: i64, n: i64) -> i64
107func atoi(s: *u8) -> i64
125func itoa(n: i64, buf: *u8) -> i64
162func print(s: *u8) -> i64
called by 157: mainmainmainmainmainmain+151 calls 2: sys_writestrlen
166func println(s: *u8) -> i64
173func print_i64(n: i64) -> i64
180func die(msg: *u8) -> i64