Skip to content

Commit

Permalink
docs(xsnap): protocol state diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 18, 2021
1 parent 4cbfd67 commit 23e99c1
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/xsnap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ The parent and child communicate using "commands".
- The Node.js parent can implement an asynchronous `handleCommand` function to
respond to commands from the XS child.

![state diagram](doc/xsnap-states.svg)

# xsrepl

With `xsnap` comes an `xsrepl` command line tool.
Expand Down
8 changes: 8 additions & 0 deletions packages/xsnap/doc/xsnap-states.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
digraph G {
idle -> idle [label="snapshot"]
idle -> running [label="rx:eval"]
idle -> running [label="rx:handleCommand"]
running -> sysCalling [label="tx:issueCommand"]
sysCalling -> running [label="rx:response"]
running -> idle [label="tx:response"]
}
67 changes: 67 additions & 0 deletions packages/xsnap/doc/xsnap-states.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 23e99c1

Please sign in to comment.