Skip to content

Commit

Permalink
Modify process API to more closely resemble BEAM-process.
Browse files Browse the repository at this point in the history
We remove the explicit Start() step in process setup, and rename a
few things.  The result is a simpler implementation on the capnp
side, and less user-facing complexity.  Future work may re-introduce
the explicit start step in the context of binding procs to anchors.
  • Loading branch information
lthibault committed Apr 19, 2023
1 parent 1b32ac1 commit 05eb139
Show file tree
Hide file tree
Showing 10 changed files with 344 additions and 679 deletions.
10 changes: 4 additions & 6 deletions api/process.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ $Go.import("github.com/wetware/ww/internal/api/process");


interface Executor {
spawn @0 (byteCode :Data, entryPoint :Text = "run") -> (process :Process);
# spawn a WASM based process from the binary module with the target
# entry function
exec @0 (bytecode :Data) -> (process :Process);
# exec a WASM based process
}

interface Process {
start @0 () -> ();
stop @1 () -> ();
wait @2 () -> (exitCode :UInt32);
wait @0 () -> (exitCode :UInt32);
kill @1 () -> ();
}
Loading

0 comments on commit 05eb139

Please sign in to comment.