Idiomatic syndicate
This commit is contained in:
parent
8002390284
commit
55fdd4cc04
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "20230502"
|
||||
version = "20230503"
|
||||
author = "Emery Hemingway"
|
||||
description = "Syndicate actor for publishing Linux ACPI events"
|
||||
license = "Unlicense"
|
||||
|
|
|
@ -43,8 +43,16 @@ proc relayEvents(ds: Ref; facet: Facet) =
|
|||
|
||||
# TODO seccomp
|
||||
|
||||
bootDataspace("main") do (ds: Ref; turn: var Turn):
|
||||
connectStdio(ds, turn)
|
||||
relayEvents(ds, turn.facet)
|
||||
type Args {.preservesDictionary.} = object
|
||||
machine: Ref
|
||||
|
||||
bootDataspace("main") do (root: Ref; turn: var Turn):
|
||||
connectStdio(root, turn)
|
||||
onPublish(turn, root, ?Args) do (ds: Ref):
|
||||
stderr.writeLine("ds is ", ds)
|
||||
relayEvents(ds, turn.facet)
|
||||
|
||||
onPublish(turn, root, grab()) do (a: Assertion):
|
||||
stderr.writeLine("saw ", a)
|
||||
|
||||
runForever()
|
||||
|
|
Loading…
Reference in New Issue