code wiki / (root) / nx_installed_census_lib.nx

nx_installed_census_lib.nx

buildroot/runtime/nx_installed_census_lib.nx

29918 B668 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_installed_census_lib.nx -- THE INSTALLED MODE OF THE INTELMINE MINER (/compare/intelmine IM20 ic_steam_library, IM22 ic_fingerprint, IM24 ic_tieout). LIB: reads a Steam client's library folders and app manifests, walks every install tree with a bounded depth and budget, fingerprints what the product SHIPS (engine, anti-cheat, VR runtime, audio and physics middleware, netcode, video, scripting, mod hooks, redistributables) from a DATA conf of name signatures, and ties each title to the review rubric already journaled for the same appid. The thin program nx_installed_census prints and writes; the gate drives this lib on a planted library under /tmp. WHY (operator 2026-09-05): "can our miner also mine installed games ... applications and systems and os ... to get a better more detailed idea on what needs to live on our /compare board vs broad strokes and have it tied out to sentiment". Reviews say WHAT PLAYERS FEEL; the install tree says WHAT THE PRODUCT IS MADE OF. Joined by appid they answer the board's question in rows a small model can read: VR HOT ships Unity + OpenXR and its reviewers complain about controls and tracking; Palworld ships Unreal + Wwise at 41 GB and its reviewers complain about optimisation. FORMATS READ (Valve KeyValues text, measured on this box 2026-09-05): steamapps/libraryfolders.vdf carries one "path" per library (Windows paths with doubled backslashes); steamapps/appmanifest_<appid>.acf carries "appid", "name", "installdir", "SizeOnDisk", "buildid", "LastUpdated", "LastPlayed" and a UserConfig "language". The install tree is <library>/steamapps/common/<installdir>. Under WSL a Windows library path is mapped to /mnt/<drive>/.... license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_reviewmine_lib.nx nx_installed_census_lib.nx nx_installed_census.nx nx_installed_census_gate.nx nx_intelmine_lib.nx

imports: nx_syscalls.nxnx_reviewmine_lib.nx

imported by: nx_installed_census.nxnx_installed_census_gate.nxnx_intelmine_lib.nx

structs

none

consts

22const IC_DIRBUF: i64 = 65536
23const IC_PATH_CAP: i64 = 4096
24const IC_MAXDEPTH_MAX: i64 = 8
25const IC_MAXDEPTH_DEFAULT: i64 = 4
28const IC_MAX_ENTRIES: i64 = 200000
29const IC_CLASS_N: i64 = 10
30const IC_FP_MAX: i64 = 512
31const IC_FP_ARENA: i64 = 65536
32const IC_LABELS_CAP: i64 = 512
33const IC_NAME_CAP: i64 = 512
34const IC_LIB_MAX: i64 = 32
35const IC_DT_DIR: i64 = 4
36const IC_DT_REG: i64 = 8
37const IC_DT_LNK: i64 = 10
38const IC_CH_DOT: i64 = 46
39const IC_CH_COLON: i64 = 58
40const IC_CH_BSLASH: i64 = 92
41const IC_CH_SEMI: i64 = 59
42const IC_SUMMARY_FIELDS: i64 = 7
43const IC_MANIFEST_PREFIX: *u8 = "appmanifest_"
44const IC_MANIFEST_SUFFIX: *u8 = ".acf"
47const IC_EXT_MAX: i64 = 128
48const IC_EXT_CAP: i64 = 12
49const IC_EXT_STRIDE: i64 = 16
50const IC_ASSETS_TOP: i64 = 8
51const IC_SEEK_END: i64 = 2
54const IC_R_APPID: i64 = 0
55const IC_R_SIZE: i64 = 1
56const IC_R_BUILDID: i64 = 2
57const IC_R_UPDATED: i64 = 3
58const IC_R_PLAYED: i64 = 4
59const IC_R_FILES: i64 = 5
60const IC_R_DIRS: i64 = 6
61const IC_R_CAPPED: i64 = 7
62const IC_R_ON_DISK: i64 = 8
63const IC_R_REVIEWS: i64 = 9
64const IC_R_SCORE: i64 = 10
65const IC_R_POS: i64 = 11
66const IC_R_NEG: i64 = 12
67const IC_R_TOTAL: i64 = 13
68const IC_R_BYTES: i64 = 14
69const IC_R_N: i64 = 16
70const IC_REC_BYTES: i64 = 128
72const IC_CLASS_ENGINE: i64 = 0
73const IC_CLASS_ANTICHEAT: i64 = 1
74const IC_CLASS_VR: i64 = 2
75const IC_CLASS_AUDIO: i64 = 3
76const IC_CLASS_NET: i64 = 4
77const IC_CLASS_VIDEO: i64 = 5
78const IC_CLASS_PHYSICS: i64 = 6
79const IC_CLASS_SCRIPT: i64 = 7
80const IC_CLASS_MOD: i64 = 8
82const IC_DEPTH_SLOTS_SPARE: i64 = 2 // per-depth buffers: depths 0..IC_MAXDEPTH_MAX inclusive, plus one spare
83const IC_NUL_PAIR: i64 = 2 // a fingerprint row stores its pattern and its label, each NUL-terminated
84const IC_SEP_AND_NUL: i64 = 2 // appending a label costs its joiner plus the NUL
85const IC_EXT_ROW_NUMS: i64 = 48 // room beside an extension name for :files:bytes (two decimal i64 with colons)
86const IC_NEEDLE_PATH_LEN: i64 = 6 // the six bytes of the quoted key path
87const IC_NEEDLE_CAP: i64 = 16
88const IC_DOTDOT_LEN: i64 = 2 // the entry name of two dots
89const IC_DRIVE_PREFIX_LEN: i64 = 2 // the drive letter and its colon before a Windows path
90const IC_ROW_MARK: i64 = 105 // the byte i that opens every census row
91const IC_SUM_F_TOTAL: i64 = 1 // <appid>.summary fields: appid|total|pos|neg|score
92const IC_SUM_F_POS: i64 = 2
93const IC_SUM_F_NEG: i64 = 3
94const IC_SUM_F_SCORE: i64 = 4

functions

126func ic_init() -> i64
151func ic_lc(c: i64) -> i64 { if c >= RM_UPPER_A { if c <= RM_UPPER_Z { return c + RM_CASE_DELTA } } return c }
152func ic_class_name(c: i64) -> *u8
164func ic_class_index(s: *u8, n: i64) -> i64
called by 1: ic_fp_load calls 2: ic_class_namerm_slen
179func ic_fp_load(path: *u8) -> i64
222func ic_fp_count() -> i64 { return ic_fp_n }
223func ic_fp_reset_found() -> i64 { var i: i64 = 0; while i < ic_fp_n { ic_fp_found[i] = 0; i = i + 1 } return 0 }
called by 1: ic_walk_reset
225func ic_name_matches(name: *u8, r: i64) -> i64
called by 1: ic_match_name calls 2: rm_slenic_lc
240func ic_match_name(name: *u8) -> i64
called by 1: ic_walk calls 1: ic_name_matches
250func ic_class_labels(c: i64, out: *u8, cap: i64) -> i64
289func ic_ext_reset() -> i64 { ic_ext_n = 0; ic_ext_overflow = 0; ic_walk_bytes = 0; return 0 }
called by 1: ic_walk_reset
291func ic_ext_of(name: *u8) -> i64
called by 1: ic_walk calls 2: rm_slenic_lc
305func ic_ext_bump(ext: *u8, bytes: i64) -> i64
called by 1: ic_walk calls 2: rm_streqrm_cat
320func ic_ext_count_get() -> i64 { return ic_ext_n }
called by 1: main
321func ic_ext_overflowed() -> i64 { return ic_ext_overflow }
322func ic_walk_bytes_get() -> i64 { return ic_walk_bytes }
called by 1: main
323func ic_ext_name_at(i: i64) -> *u8 { return (ic_ext_names as i64 + i * IC_EXT_STRIDE) as *u8 }
called by 1: ic_assets_summary
324func ic_ext_files_at(i: i64) -> i64 { return ic_ext_count[i] }
325func ic_ext_bytes_at(i: i64) -> i64 { return ic_ext_bytes[i] }
326func ic_file_size(path: *u8) -> i64
335func ic_assets_summary(out: *u8, cap: i64, topn: i64) -> i64
365func ic_walk(dir: *u8, depth: i64) -> i64
424func ic_walk_reset() -> i64 { ic_walk_entries = 0; ic_walk_files = 0; ic_walk_dirs = 0; ic_walk_capped = 0; ic_fp_reset_found(); ic_ext_reset(); return 0 }
425func ic_walk_files_seen() -> i64 { return ic_walk_files }
called by 1: main
426func ic_walk_dirs_seen() -> i64 { return ic_walk_dirs }
called by 1: main
427func ic_walk_was_capped() -> i64 { return ic_walk_capped }
428func ic_set_maxdepth(d: i64) -> i64 { if d < 0 { return 0 } if d > IC_MAXDEPTH_MAX { ic_maxdepth = IC_MAXDEPTH_MAX } else { ic_maxdepth = d } return 0 }
called by 2: mainmain
431func ic_kv(buf: *u8, n: i64, key: *u8, from: i64, to: i64, out: *u8, cap: i64) -> i64
called by 2: ic_librariesic_manifest calls 1: rm_slen
473func ic_map_path(src: *u8, dst: *u8, cap: i64) -> i64
called by 2: mainic_libraries calls 2: rm_catic_lc
492func ic_lib_at(i: i64) -> *u8 { return (ic_libs as i64 + i * IC_PATH_CAP) as *u8 }
called by 2: mainic_lib_add
493func ic_lib_count() -> i64 { return ic_lib_n }
494func ic_lib_add(p: *u8) -> i64
506func ic_needle_path() -> *u8
called by 1: ic_libraries calls 2: sys_mmaprm_cat
517func ic_libraries(steamroot: *u8) -> i64
547func ic_manifest(path: *u8) -> i64
570func ic_rec_get(slot: i64) -> i64 { return ic_rec[slot] }
571func ic_name_get() -> *u8 { return ic_name }
called by 2: icp_print_appmain
572func ic_installdir_get() -> *u8 { return ic_installdir }
573func ic_lang_get() -> *u8 { return ic_lang }
called by 2: icp_print_appmain
575func ic_tieout(reviewdir: *u8, appid: i64) -> i64
608func ic_row_emit(libidx: i64, out: *u8, cap: i64) -> i64
639func ic_census_app(lib: *u8, manifest_path: *u8, reviewdir: *u8) -> i64
658func ic_is_manifest(name: *u8) -> i64
called by 2: mainmain calls 1: rm_slen