code wiki / (root) / nx_module_registry.nx

nx_module_registry.nx

buildroot/runtime/nx_module_registry.nx

11156 B279 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic module
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_module_registry.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

128struct ModuleRecord
178struct InstallPlan

consts

63const NX_CAP_KERNEL: i64 = 1
64const NX_CAP_BROWSER: i64 = 2
65const NX_CAP_COMMS: i64 = 3
66const NX_CAP_IOT: i64 = 4
67const NX_CAP_GREENHOUSE: i64 = 5
68const NX_CAP_SEEDBANK: i64 = 6
69const NX_CAP_GAME_ENGINE: i64 = 7
70const NX_CAP_MARKETPLACE: i64 = 8
71const NX_CAP_STORAGE: i64 = 9
72const NX_CAP_CRYPTO: i64 = 10
73const NX_CAP_ML: i64 = 11
74const NX_CAP_COMPILER: i64 = 12
75const NX_CAP_BENCH: i64 = 13
76const NX_CAP_CORE_MATH: i64 = 14
77const NX_CAP_CORE_NET: i64 = 15
78const NX_CAP_CORE_SYSCALLS: i64 = 16
79const NX_CAP_CORE_IO: i64 = 17
80const NX_CAP_CURRICULUM: i64 = 18 // game-curriculum modules (Pillar replenisher)
81const NX_CAP_REGULATORY: i64 = 19 // state-law + tax + KYC routers
82const NX_CAP_PROCGEN: i64 = 20 // causal-growth + biome + procgen substrate
110const NX_STABILITY_ALPHA: i64 = 1 // unstable; may change/disappear
111const NX_STABILITY_BETA: i64 = 2 // mostly stable; minor breaks possible
112const NX_STABILITY_STABLE: i64 = 3 // API frozen per Cardinal 19
113const NX_STABILITY_DEPRECATED: i64 = 4 // scheduled for removal; alternative exists
144const NX_MODULE_RECORD_BYTES: i64 = 96 // 12 fields * 8 bytes
161const NX_INSTALL_OK: i64 = 1
162const NX_INSTALL_MISSING_DEPENDENCY: i64 = 2 // user excluded a transitive dep
163const NX_INSTALL_CIRCULAR_DEPENDENCY: i64 = 3 // manifest data error
164const NX_INSTALL_UNKNOWN_CAPABILITY: i64 = 4 // typo'd capability flag
165const NX_INSTALL_DISK_BUDGET_EXCEEDED: i64 = 5 // user --max-disk-mb set
188const NX_INSTALL_PLAN_BYTES: i64 = 56 // 7 fields * 8 bytes
223const NX_MODULE_MAX_PER_INSTALL: i64 = 4096
266const NX_DIST_CHANNEL_HTTPS: i64 = 1
267const NX_DIST_CHANNEL_BITTORRENT: i64 = 2
268const NX_DIST_CHANNEL_IPFS: i64 = 3
269const NX_DIST_CHANNEL_LOCAL_RSYNC: i64 = 4
270const NX_DIST_CHANNEL_USB_OFFLINE: i64 = 5 // air-gapped install

functions

84func nx_cap_name(c: i64) -> *u8
115func nx_stability_name(s: i64) -> *u8
148func nx_cap_bitmask_has(bitmask: i64, capability: i64) -> i64
154func nx_cap_bitmask_set(bitmask: i64, capability: i64) -> i64
167func nx_install_verdict_name(v: i64) -> *u8
190func nx_install_plan_new(requested_capabilities: i64) -> *InstallPlan
calls 1: sys_mmap
213func nx_module_direct_match(record: *ModuleRecord, requested_capabilities: i64) -> i64
225func nx_install_sum_disk_bytes(modules: **ModuleRecord, n_modules: i64) -> i64
249func nx_capability_string_to_id(name: *u8) -> i64
272func nx_dist_channel_name(c: i64) -> *u8