nx_installed_census_lib.nx
buildroot/runtime/nx_installed_census_lib.nx
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
imports: nx_syscalls.nxnx_reviewmine_lib.nx
imported by: nx_installed_census.nxnx_installed_census_gate.nxnx_intelmine_lib.nx
structs
| none |
consts
| 22 | const IC_DIRBUF: i64 = 65536 |
| 23 | const IC_PATH_CAP: i64 = 4096 |
| 24 | const IC_MAXDEPTH_MAX: i64 = 8 |
| 25 | const IC_MAXDEPTH_DEFAULT: i64 = 4 |
| 28 | const IC_MAX_ENTRIES: i64 = 200000 |
| 29 | const IC_CLASS_N: i64 = 10 |
| 30 | const IC_FP_MAX: i64 = 512 |
| 31 | const IC_FP_ARENA: i64 = 65536 |
| 32 | const IC_LABELS_CAP: i64 = 512 |
| 33 | const IC_NAME_CAP: i64 = 512 |
| 34 | const IC_LIB_MAX: i64 = 32 |
| 35 | const IC_DT_DIR: i64 = 4 |
| 36 | const IC_DT_REG: i64 = 8 |
| 37 | const IC_DT_LNK: i64 = 10 |
| 38 | const IC_CH_DOT: i64 = 46 |
| 39 | const IC_CH_COLON: i64 = 58 |
| 40 | const IC_CH_BSLASH: i64 = 92 |
| 41 | const IC_CH_SEMI: i64 = 59 |
| 42 | const IC_SUMMARY_FIELDS: i64 = 7 |
| 43 | const IC_MANIFEST_PREFIX: *u8 = "appmanifest_" |
| 44 | const IC_MANIFEST_SUFFIX: *u8 = ".acf" |
| 47 | const IC_EXT_MAX: i64 = 128 |
| 48 | const IC_EXT_CAP: i64 = 12 |
| 49 | const IC_EXT_STRIDE: i64 = 16 |
| 50 | const IC_ASSETS_TOP: i64 = 8 |
| 51 | const IC_SEEK_END: i64 = 2 |
| 54 | const IC_R_APPID: i64 = 0 |
| 55 | const IC_R_SIZE: i64 = 1 |
| 56 | const IC_R_BUILDID: i64 = 2 |
| 57 | const IC_R_UPDATED: i64 = 3 |
| 58 | const IC_R_PLAYED: i64 = 4 |
| 59 | const IC_R_FILES: i64 = 5 |
| 60 | const IC_R_DIRS: i64 = 6 |
| 61 | const IC_R_CAPPED: i64 = 7 |
| 62 | const IC_R_ON_DISK: i64 = 8 |
| 63 | const IC_R_REVIEWS: i64 = 9 |
| 64 | const IC_R_SCORE: i64 = 10 |
| 65 | const IC_R_POS: i64 = 11 |
| 66 | const IC_R_NEG: i64 = 12 |
| 67 | const IC_R_TOTAL: i64 = 13 |
| 68 | const IC_R_BYTES: i64 = 14 |
| 69 | const IC_R_N: i64 = 16 |
| 70 | const IC_REC_BYTES: i64 = 128 |
| 72 | const IC_CLASS_ENGINE: i64 = 0 |
| 73 | const IC_CLASS_ANTICHEAT: i64 = 1 |
| 74 | const IC_CLASS_VR: i64 = 2 |
| 75 | const IC_CLASS_AUDIO: i64 = 3 |
| 76 | const IC_CLASS_NET: i64 = 4 |
| 77 | const IC_CLASS_VIDEO: i64 = 5 |
| 78 | const IC_CLASS_PHYSICS: i64 = 6 |
| 79 | const IC_CLASS_SCRIPT: i64 = 7 |
| 80 | const IC_CLASS_MOD: i64 = 8 |
| 82 | const IC_DEPTH_SLOTS_SPARE: i64 = 2 // per-depth buffers: depths 0..IC_MAXDEPTH_MAX inclusive, plus one spare |
| 83 | const IC_NUL_PAIR: i64 = 2 // a fingerprint row stores its pattern and its label, each NUL-terminated |
| 84 | const IC_SEP_AND_NUL: i64 = 2 // appending a label costs its joiner plus the NUL |
| 85 | const IC_EXT_ROW_NUMS: i64 = 48 // room beside an extension name for :files:bytes (two decimal i64 with colons) |
| 86 | const IC_NEEDLE_PATH_LEN: i64 = 6 // the six bytes of the quoted key path |
| 87 | const IC_NEEDLE_CAP: i64 = 16 |
| 88 | const IC_DOTDOT_LEN: i64 = 2 // the entry name of two dots |
| 89 | const IC_DRIVE_PREFIX_LEN: i64 = 2 // the drive letter and its colon before a Windows path |
| 90 | const IC_ROW_MARK: i64 = 105 // the byte i that opens every census row |
| 91 | const IC_SUM_F_TOTAL: i64 = 1 // <appid>.summary fields: appid|total|pos|neg|score |
| 92 | const IC_SUM_F_POS: i64 = 2 |
| 93 | const IC_SUM_F_NEG: i64 = 3 |
| 94 | const IC_SUM_F_SCORE: i64 = 4 |
functions
| 126 | func ic_init() -> i64 |
| 151 | func ic_lc(c: i64) -> i64 { if c >= RM_UPPER_A { if c <= RM_UPPER_Z { return c + RM_CASE_DELTA } } return c } |
| 152 | func ic_class_name(c: i64) -> *u8 |
| 164 | func ic_class_index(s: *u8, n: i64) -> i64 |
| 179 | func ic_fp_load(path: *u8) -> i64 |
| 222 | func ic_fp_count() -> i64 { return ic_fp_n } |
| 223 | func 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 |
| 225 | func ic_name_matches(name: *u8, r: i64) -> i64 |
| 240 | func ic_match_name(name: *u8) -> i64 |
| 250 | func ic_class_labels(c: i64, out: *u8, cap: i64) -> i64 |
| 289 | func ic_ext_reset() -> i64 { ic_ext_n = 0; ic_ext_overflow = 0; ic_walk_bytes = 0; return 0 } called by 1: ic_walk_reset |
| 291 | func ic_ext_of(name: *u8) -> i64 |
| 305 | func ic_ext_bump(ext: *u8, bytes: i64) -> i64 |
| 320 | func ic_ext_count_get() -> i64 { return ic_ext_n } called by 1: main |
| 321 | func ic_ext_overflowed() -> i64 { return ic_ext_overflow } |
| 322 | func ic_walk_bytes_get() -> i64 { return ic_walk_bytes } called by 1: main |
| 323 | func 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 |
| 324 | func ic_ext_files_at(i: i64) -> i64 { return ic_ext_count[i] } |
| 325 | func ic_ext_bytes_at(i: i64) -> i64 { return ic_ext_bytes[i] } |
| 326 | func ic_file_size(path: *u8) -> i64 |
| 335 | func ic_assets_summary(out: *u8, cap: i64, topn: i64) -> i64 |
| 365 | func ic_walk(dir: *u8, depth: i64) -> i64 called by 2: ic_walkic_census_app calls 13: sys_openat_rdrm_slensys_getdents64dirent_reclendirent_typedirent_name+7 |
| 424 | func 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 } |
| 425 | func ic_walk_files_seen() -> i64 { return ic_walk_files } called by 1: main |
| 426 | func ic_walk_dirs_seen() -> i64 { return ic_walk_dirs } called by 1: main |
| 427 | func ic_walk_was_capped() -> i64 { return ic_walk_capped } |
| 428 | func 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 } |
| 431 | func ic_kv(buf: *u8, n: i64, key: *u8, from: i64, to: i64, out: *u8, cap: i64) -> i64 |
| 473 | func ic_map_path(src: *u8, dst: *u8, cap: i64) -> i64 |
| 492 | func ic_lib_at(i: i64) -> *u8 { return (ic_libs as i64 + i * IC_PATH_CAP) as *u8 } |
| 493 | func ic_lib_count() -> i64 { return ic_lib_n } |
| 494 | func ic_lib_add(p: *u8) -> i64 |
| 506 | func ic_needle_path() -> *u8 |
| 517 | func ic_libraries(steamroot: *u8) -> i64 |
| 547 | func ic_manifest(path: *u8) -> i64 |
| 570 | func ic_rec_get(slot: i64) -> i64 { return ic_rec[slot] } |
| 571 | func ic_name_get() -> *u8 { return ic_name } |
| 572 | func ic_installdir_get() -> *u8 { return ic_installdir } |
| 573 | func ic_lang_get() -> *u8 { return ic_lang } |
| 575 | func ic_tieout(reviewdir: *u8, appid: i64) -> i64 |
| 608 | func ic_row_emit(libidx: i64, out: *u8, cap: i64) -> i64 |
| 639 | func ic_census_app(lib: *u8, manifest_path: *u8, reviewdir: *u8) -> i64 |
| 658 | func ic_is_manifest(name: *u8) -> i64 |