nx_mycorrhiza.nx
buildroot/runtime/nx_mycorrhiza.nx
about
nx_mycorrhiza.nx -- cross-substrate symbiotic resource exchange.
Biology: mycorrhizal fungi form symbiotic networks with ~90% of land
plants -- fungus delivers water + minerals (esp. phosphorus) from soil,
plant delivers sugars from photosynthesis. Bidirectional, REGULATED,
and the partnership only persists when both parties net-benefit. When
one partner extracts without giving, the partnership is severed.
In Nishi: bridges Nishi-native cells <-> foreign symbiotes (Steam,
Linux processes, etc.) for resource exchange under treaty. Composes
with [[nx_symbiote]] (existing foreign-process virtual cell) +
[[nx_treaty]] (bilateral cooperative agreement) + CONDUCTOR cardinal
(heterogeneous-compute orchestration) + [[feedback-reclamation-doctrine
-captain-moroni]] (reclaim commodity hardware unused resources).
V1 ships exchange-class enum + flow-rate accounting + reciprocity audit.
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_commons_defect_gate.nxnx_mycorrhiza_test.nx
structs
| 53 | struct NxExchangeFlow |
| 64 | struct NxMycorrhiza |
consts
| 20 | const NX_MAGIC_1024: i64 = 1024 |
| 24 | const NX_MY_KIND_RAM_BYTES: nx_int = 0 |
| 25 | const NX_MY_KIND_VRAM_BYTES: nx_int = 1 |
| 26 | const NX_MY_KIND_DISK_BYTES: nx_int = 2 |
| 27 | const NX_MY_KIND_CPU_MICROSECONDS: nx_int = 3 |
| 28 | const NX_MY_KIND_GPU_MICROSECONDS: nx_int = 4 |
| 29 | const NX_MY_KIND_NETWORK_BYTES: nx_int = 5 |
| 30 | const NX_MY_KIND_COMPUTED_VALUE: nx_int = 6 // domain-specific Q10 utility |
| 31 | const NX_MY_KIND_N: nx_int = 7 |
| 35 | const NX_MY_DIR_NATIVE_TO_FOREIGN: nx_int = 0 // Nishi gives, foreign receives |
| 36 | const NX_MY_DIR_FOREIGN_TO_NATIVE: nx_int = 1 // foreign gives, Nishi receives |
| 37 | const NX_MY_DIR_N: nx_int = 2 |
| 41 | const NX_MY_V_OK_BALANCED: nx_int = 0 // reciprocity within tolerance |
| 42 | const NX_MY_V_OK_NATIVE_NET_GIVER: nx_int = 1 // we give more, acceptable |
| 43 | const NX_MY_V_OK_NATIVE_NET_TAKER: nx_int = 2 // we receive more, acceptable |
| 44 | const NX_MY_V_EXTRACTION_BY_FOREIGN: nx_int = 3 // foreign takes >> gives |
| 45 | const NX_MY_V_EXTRACTION_BY_NATIVE: nx_int = 4 // we take >> give (REFUSED) |
| 46 | const NX_MY_V_SEVERED: nx_int = 5 |
| 47 | const NX_MY_V_INVALID: nx_int = 6 |
| 48 | const NX_MY_V_NULL: nx_int = 7 |
| 49 | const NX_MY_V_N: nx_int = 8 |
| 62 | const NX_MY_F_BYTES: nx_int = 40 |
| 76 | const NX_MY_BYTES: nx_int = 56 |
| 201 | const NX_MY_I64_MAX: nx_int = 9223372036854775807 |
functions
| 80 | func nx_my_kind_is_valid(k: nx_int) -> nx_int |
| 86 | func nx_my_dir_is_valid(d: nx_int) -> nx_int |
| 92 | func nx_my_v_is_valid(v: nx_int) -> nx_int called by 1: main |
| 100 | func nx_my_new(partnership_id: nx_int, |
| 124 | func _my_flow_at(m: *NxMycorrhiza, idx: nx_int) -> *NxExchangeFlow called by 1: nx_my_total_by_kind_dir |
| 133 | func nx_my_record_flow(m: *NxMycorrhiza, |
| 159 | func nx_my_sever(m: *NxMycorrhiza) -> nx_int called by 1: main |
| 167 | func nx_my_total_by_kind_dir(m: *NxMycorrhiza, |
| 203 | func _my_ratio_q10(num: nx_int, den: nx_int) -> nx_int called by 1: nx_my_audit_kind |
| 221 | func nx_my_audit_kind(m: *NxMycorrhiza, kind: nx_int) -> nx_int |
| 256 | func nx_my_flow_count(m: *NxMycorrhiza) -> nx_int called by 1: main |
| 261 | func nx_my_is_severed(m: *NxMycorrhiza) -> nx_int called by 1: main |