nx_module_registry.nx
buildroot/runtime/nx_module_registry.nx
about
nx_module_registry.nx -- modular stdlib backbone.
module: nishi-core.install.module_registry
depends: nishi-core.io.csv, nishi-core.io.syscalls
disk_kb: 8
capability: CORE_SYSCALLS
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: debian_apt_package_dependency_resolution +
rust_cargo_feature_flags +
python_pep_440_optional_dependencies +
freebsd_pkg_sets +
nishi_modular_stdlib_opt_in_cardinal_2026
Per cardinal [[feedback-modular-stdlib-opt-in-at-install-time]]:
Nishi family substrate is NOT a monolithic stdlib. Each `.nx`
file declares MODULE METADATA at the top of the file (the header
comment block above this one is the canonical shape). This
primitive READS the module manifest, resolves capability-tag
selections + transitive dependencies, and reports the disk-
footprint of any install configuration.
User experience:
$ nishi install --capability greenhouse,iot
Resolving 47 modules + 12 transitive deps.
Total disk: 14.2 MB (3.1 MB compressed).
Confirm? [y/N]:
===== Module manifest record shape ===============================
Each module is one record in nishi-core/modules/manifest.jsonl:
{ "module": "nishi-greenhouse.crop.potato",
"path": "nishi-greenhouse/runtime/nx_crop_potato.nx",
"version": "0.1.0",
"capabilities": ["GREENHOUSE"],
"depends": [
"nishi-core.math.q10",
"nishi-core.math.exp",
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| 128 | struct ModuleRecord |
| 178 | struct InstallPlan |
consts
| 63 | const NX_CAP_KERNEL: i64 = 1 |
| 64 | const NX_CAP_BROWSER: i64 = 2 |
| 65 | const NX_CAP_COMMS: i64 = 3 |
| 66 | const NX_CAP_IOT: i64 = 4 |
| 67 | const NX_CAP_GREENHOUSE: i64 = 5 |
| 68 | const NX_CAP_SEEDBANK: i64 = 6 |
| 69 | const NX_CAP_GAME_ENGINE: i64 = 7 |
| 70 | const NX_CAP_MARKETPLACE: i64 = 8 |
| 71 | const NX_CAP_STORAGE: i64 = 9 |
| 72 | const NX_CAP_CRYPTO: i64 = 10 |
| 73 | const NX_CAP_ML: i64 = 11 |
| 74 | const NX_CAP_COMPILER: i64 = 12 |
| 75 | const NX_CAP_BENCH: i64 = 13 |
| 76 | const NX_CAP_CORE_MATH: i64 = 14 |
| 77 | const NX_CAP_CORE_NET: i64 = 15 |
| 78 | const NX_CAP_CORE_SYSCALLS: i64 = 16 |
| 79 | const NX_CAP_CORE_IO: i64 = 17 |
| 80 | const NX_CAP_CURRICULUM: i64 = 18 // game-curriculum modules (Pillar replenisher) |
| 81 | const NX_CAP_REGULATORY: i64 = 19 // state-law + tax + KYC routers |
| 82 | const NX_CAP_PROCGEN: i64 = 20 // causal-growth + biome + procgen substrate |
| 110 | const NX_STABILITY_ALPHA: i64 = 1 // unstable; may change/disappear |
| 111 | const NX_STABILITY_BETA: i64 = 2 // mostly stable; minor breaks possible |
| 112 | const NX_STABILITY_STABLE: i64 = 3 // API frozen per Cardinal 19 |
| 113 | const NX_STABILITY_DEPRECATED: i64 = 4 // scheduled for removal; alternative exists |
| 144 | const NX_MODULE_RECORD_BYTES: i64 = 96 // 12 fields * 8 bytes |
| 161 | const NX_INSTALL_OK: i64 = 1 |
| 162 | const NX_INSTALL_MISSING_DEPENDENCY: i64 = 2 // user excluded a transitive dep |
| 163 | const NX_INSTALL_CIRCULAR_DEPENDENCY: i64 = 3 // manifest data error |
| 164 | const NX_INSTALL_UNKNOWN_CAPABILITY: i64 = 4 // typo'd capability flag |
| 165 | const NX_INSTALL_DISK_BUDGET_EXCEEDED: i64 = 5 // user --max-disk-mb set |
| 188 | const NX_INSTALL_PLAN_BYTES: i64 = 56 // 7 fields * 8 bytes |
| 223 | const NX_MODULE_MAX_PER_INSTALL: i64 = 4096 |
| 266 | const NX_DIST_CHANNEL_HTTPS: i64 = 1 |
| 267 | const NX_DIST_CHANNEL_BITTORRENT: i64 = 2 |
| 268 | const NX_DIST_CHANNEL_IPFS: i64 = 3 |
| 269 | const NX_DIST_CHANNEL_LOCAL_RSYNC: i64 = 4 |
| 270 | const NX_DIST_CHANNEL_USB_OFFLINE: i64 = 5 // air-gapped install |
functions
| 84 | func nx_cap_name(c: i64) -> *u8 |
| 115 | func nx_stability_name(s: i64) -> *u8 |
| 148 | func nx_cap_bitmask_has(bitmask: i64, capability: i64) -> i64 |
| 154 | func nx_cap_bitmask_set(bitmask: i64, capability: i64) -> i64 |
| 167 | func nx_install_verdict_name(v: i64) -> *u8 |
| 190 | func nx_install_plan_new(requested_capabilities: i64) -> *InstallPlan calls 1: sys_mmap |
| 213 | func nx_module_direct_match(record: *ModuleRecord, requested_capabilities: i64) -> i64 |
| 225 | func nx_install_sum_disk_bytes(modules: **ModuleRecord, n_modules: i64) -> i64 |
| 249 | func nx_capability_string_to_id(name: *u8) -> i64 |
| 272 | func nx_dist_channel_name(c: i64) -> *u8 |