Crates.io | wacker-api |
lib.rs | wacker-api |
version | 0.1.3 |
source | src |
created_at | 2023-11-23 07:22:20.371971 |
updated_at | 2023-12-08 08:45:39.284918 |
description | wacker API |
homepage | |
repository | https://github.com/iawia002/wacker |
max_upload_size | |
id | 1045873 |
size | 4,557 |
Like Docker, but for WASM.
You can download binaries directly from the Releases page.
Or you can install it using cargo
:
cargo install wacker
cargo install wacker-cli
Start the wacker daemon:
$ wackerd
[2023-11-22T07:25:31Z INFO wackerd] server listening on "/Users/user/.wacker/wacker.sock"
Run a WebAssembly module:
$ wacker run hello.wasm
$ wacker run time.wasm
Where hello.wasm
is a simple WASM program that prints out Hello World!
and exits, and time.wasm
is a long-running program that constantly prints out the current time.
List running modules:
$ wacker list
ID PATH STATUS
hello-w0AqXnf hello.wasm Finished
time-xhQVmjU time.wasm Running
Fetch the logs:
$ wacker logs hello-w0AqXnf
Hello World!
$ wacker logs -f --tail 5 time-xhQVmjU
current time: 2023-11-22 07:42:34
current time: 2023-11-22 07:42:35
current time: 2023-11-22 07:42:36
current time: 2023-11-22 07:42:37
current time: 2023-11-22 07:42:38
And you can also stop/restart/delete the module:
$ wacker stop time-xhQVmjU
$ wacker restart time-xhQVmjU
$ wacker delete/rm time-xhQVmjU
Usage for wacker cli:
$ wacker -h
wacker client
Usage: wacker <COMMAND>
Commands:
run Runs a WebAssembly module
list List running WebAssembly modules
stop Stops a WebAssembly module
restart Restart a WebAssembly module
delete Delete a WebAssembly module
logs Fetch the logs of a module
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version