4dc6a84c739f524f09e5378ddb79140fd11629988a8a451c0e823f6c1dc21e96.tri (765B)
1 !import base as B 2 !import conversions as C 3 !import io_v2 as IO 4 !import arboricx_streaming_v2 as Server 5 !import arboricx_handlers as Registry 6 !export main 7 !export server 8 -- Native streaming registry, separate from the unchanged deployed v1 entrypoint. 9 -- Source-owned ./store, 1-MiB body/object budget and bounded FIFO16 admission. 10 port ["ipv4" _ value] = value 11 port _ = 0 12 ready listener = do IO.require 13 address <- IO.localAddress listener 14 writer <- IO.stdout 15 IO.require (IO.writeAll writer (B.append (C.showNumber (port address)) [10])) IO.pure 16 server root address count = IO.io (Server.serveCount root 1048576 Registry.stdoutLogV2 address 16 count ready) 17 main = IO.io (Server.serve "./store" 1048576 Registry.stdoutLogV2 (IO.ipv4 [127 0 0 1] 9050) 16 ready)