code wiki / (root) / nx_wall_scan_native.nx

nx_wall_scan_native.nx

buildroot/runtime/nx_wall_scan_native.nx

7439 B219 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind orphan library
docsdependenciesstructsconstsfunctions

about

nx_wall_scan_native.nx -- substrate-native wall-tier scanner. license_tier: ORIGINAL Substrate-native equivalent of `bench/wall_scan.sh --count`. Walks runtime/*.nx via sys_getdents64 + sys_read_file, classifies each by license_tier header, prints aggregate counts. Zero fork+exec; single binary; typed sealed-verdict per file. Bench against shell-pipeline wall_scan.sh: shell v3: ~2.3s on 5019 files (one grep -nHE + awk) native: measured by `time qemu-riscv64-static nx_wall_scan.elf` Honest verdict on completion.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_dirent.nx nx_fcntl.nx nx_wall_scan_native.nx

imports: nx_syscalls.nxnx_dirent.nxnx_fcntl.nx

imported by: nobody (leaf or entry point)

structs

none

consts

26const TIER_NONE: i64 = 0
27const TIER_T0: i64 = 1
28const TIER_REDERIVE: i64 = 2
29const TIER_ORIG: i64 = 3
30const TIER_OTHER: i64 = 4
32const DIR_BUF_CAP: i64 = 32768
33const FILE_HEAD_CAP: i64 = 4096 // license headers live in first ~2KB
34const PATH_BUF_CAP: i64 = 512

functions

38func _eq_at(buf: *u8, n: i64, off: i64, needle: *u8, nlen: i64) -> i64
53func classify_bytes(buf: *u8, n: i64) -> i64
97func _build_path(path_buf: *u8, name: *u8, name_len: i64) -> i64
111func _ends_in_nx(name: *u8, n: i64) -> i64
123func print_i64_field(label: *u8, v: i64) -> i64
152func main() -> i64