clone-shim/README.md

24 lines
779 B
Markdown
Raw Normal View History

2022-02-11 15:03:15 +00:00
# clone-shim
2022-02-28 20:42:44 +00:00
## Running the examples
### examples/basic
The basic example instructs the shim to spawn two processes, each of which writes "hello from main{1,2}!" to stdout.
To run this example:
2022-04-07 21:57:11 +01:00
cargo build
2022-02-28 20:42:44 +00:00
cargo build --example basic
2022-04-07 21:57:11 +01:00
sudo target/debug/clone-shim -s examples/basic/spec.json target/debug/examples/basic
2022-03-01 11:29:13 +00:00
### examples/pipes
The pipes example shows some of the power of the shim by using pipes. The process "pipe_sender" sends two messages down a pipe that it's given by the shim. These two messages each spawn a completely isolated process, "pipe_receiver", that receives that message.
To run this example:
2022-04-07 21:57:11 +01:00
cargo build
2022-03-01 11:29:13 +00:00
cargo build --example pipes
2022-04-07 21:57:11 +01:00
sudo target/debug/clone-shim -s examples/pipes/spec.json target/debug/examples/pipes