nx_mycorrhizal.nx
buildroot/runtime/nx_mycorrhizal.nx
about
nx_mycorrhizal.nx -- peer-mesh network topology (fungal web).
Biology: mycorrhizal fungi form a "wood-wide-web" between plant
roots. Many bilateral hyphae connections compose into a network
topology that shares nutrients, water, and chemical signals across
an entire forest -- redundant, decentralized, healing.
DIFFERENT FROM nx_hypha (which already exists for point-to-point
peer share): nx_hypha is one edge. nx_mycorrhizal is the entire
NETWORK of edges + nodes, with topology operations: connect,
disconnect, traverse, find_shortest_path, count_healthy_peers,
detect_partition.
Per [[feedback-pathway-tropism-block-composition-location-agnostic]]
vision: "same .nx pathway runs local/NAS/peer/cloud transparently."
Mycorrhizal is the substrate-side topology over which peer
pathways live.
Composes:
nx_hypha -- the edges this network is made of (each hypha
is one bilateral connection)
nx_pollinate -- distributes payloads ACROSS the mycorrhizal
network (the topology determines who receives)
nx_organism -- multi-host organism federations live atop this
nx_tropism -- location-policy resolver consults topology
when choosing destination
nx_microbiome -- a mycorrhizal network of microbiomes is one
legitimate "forest" topology
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_mycorrhizal_test.nxnx_tier3_ecology_compose_test.nx
structs
| 44 | struct NxMycoNode |
| 53 | struct NxMycoEdge |
| 62 | struct NxMycorrhizalNetwork |
consts
| 32 | const NX_MAGIC_1024: i64 = 1024 |
| 36 | const NX_MYC_OK: nx_int = 0 |
| 37 | const NX_MYC_ERR_FULL: nx_int = 1 |
| 38 | const NX_MYC_ERR_NOT_FOUND: nx_int = 2 |
| 39 | const NX_MYC_ERR_ALREADY_LINKED: nx_int = 3 |
| 40 | const NX_MYC_ERR_PARTITIONED: nx_int = 4 |
| 71 | const NX_MYC_NODE_BYTES: nx_size = 32 |
| 72 | const NX_MYC_EDGE_BYTES: nx_size = 32 |
| 74 | const NX_MYC_HEALTHY_THRESHOLD_Q10: nx_int = 614 // 60% |
functions
| 76 | func nx_mycorrhizal_new(node_capacity: nx_size, |
| 90 | func _myc_node_at(n: *NxMycorrhizalNetwork, idx: nx_size) -> *NxMycoNode |
| 94 | func _myc_edge_at(n: *NxMycorrhizalNetwork, idx: nx_size) -> *NxMycoEdge |
| 98 | func _myc_find_node(n: *NxMycorrhizalNetwork, peer_id: nx_int) -> nx_int called by 3: nx_mycorrhizal_joinnx_mycorrhizal_linknx_mycorrhizal_update_health calls 1: _myc_node_at |
| 108 | func nx_mycorrhizal_join(n: *NxMycorrhizalNetwork, |
| 123 | func _myc_find_edge(n: *NxMycorrhizalNetwork, a: nx_int, b: nx_int) -> nx_int |
| 138 | func nx_mycorrhizal_link(n: *NxMycorrhizalNetwork, |
| 156 | func nx_mycorrhizal_peer_count(n: *NxMycorrhizalNetwork) -> nx_size |
| 160 | func nx_mycorrhizal_edge_count(n: *NxMycorrhizalNetwork) -> nx_size |
| 164 | func nx_mycorrhizal_is_linked(n: *NxMycorrhizalNetwork, |
| 172 | func nx_mycorrhizal_count_healthy(n: *NxMycorrhizalNetwork) -> nx_int |
| 189 | func nx_mycorrhizal_peer_degree(n: *NxMycorrhizalNetwork, peer_id: nx_int) -> nx_int |
| 203 | func nx_mycorrhizal_update_health(n: *NxMycorrhizalNetwork, |