code wiki / (root) / runtime.nx

runtime.nx

buildroot/runtime/runtime.nx

4618 B179 linesdepth 3pulls 3 transitivereach 21 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 · 21 importers

syscalls.nx runtime.nx nx_ac_monitor_census.nx nx_argv.nx nx_corpus_drive.nx nx_dedup_audit.nx nx_env.nx nx_func_compare.nx nx_func_extract.nx nx_gate_baseline_harness.nx nx_gate_baseline_sweep.nx nx_gate_mutation_probe.nx

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

imports: syscalls.nx

imported by: nx_ac_monitor_census.nxnx_argv.nxnx_corpus_drive.nxnx_dedup_audit.nxnx_env.nxnx_func_compare.nxnx_func_extract.nxnx_gate_baseline_harness.nxnx_gate_baseline_sweep.nxnx_gate_mutation_probe.nxnx_gate_mutation_sweep.nxnx_handoff_gate.nxnx_handoff_gate_proof.nxnx_input.nxnx_path.nxnx_sensor_gap_census.nxnx_substrate_evolve.nxnx_termios.nxnx_tty.nxnx_tty_test.nxruntime_test.nx

structs

24struct Arena {

consts

none

functions

30func arena_new(size: i64) -> *Arena {
called by 1: main
41func arena_alloc(a: *Arena, n: i64) -> *u8 {
called by 1: main
55func strlen(s: *u8) -> i64 {
62func strneq(a: *u8, b: *u8, n: i64) -> i64 {
72func streq(a: *u8, b: *u8) -> i64 {
79func memcpy(dst: *u8, src: *u8, n: i64) -> i64 {
88func memset(dst: *u8, v: i64, n: i64) -> i64 {
101func atoi(s: *u8) -> i64 {
called by 1: main
119func itoa(n: i64, buf: *u8) -> i64 {
156func print(s: *u8) -> i64 {
160func println(s: *u8) -> i64 {
167func print_i64(n: i64) -> i64 {
174func die(msg: *u8) -> i64 {
calls 1: strlen