# MARKUS MAIWALD (ARCHITECT) | VOXIS FORGE (AI) # RUMPK CORE // BUS # The Global Message Bus for Nexus Channels. # # This registry allows Fibers to discover Channels by SipHash ID. {.push stackTrace: off, lineTrace: off.} import channel const MAX_CHANNELS = 32 type Bus* = object channels*: array[MAX_CHANNELS, ptr Channel[64]] # Fixed size for now count*: int var global_bus*: Bus proc register*(chan: ptr Channel[64]) = if global_bus.count < MAX_CHANNELS: global_bus.channels[global_bus.count] = chan inc global_bus.count proc findChannel*(id: ChannelID): ptr Channel[64] = for i in 0..