wacker-api

Crates.iowacker-api
lib.rswacker-api
version0.1.3
sourcesrc
created_at2023-11-23 07:22:20.371971
updated_at2023-12-08 08:45:39.284918
descriptionwacker API
homepage
repositoryhttps://github.com/iawia002/wacker
max_upload_size
id1045873
size4,557
Xinzhao Xu (iawia002)

documentation

README

wacker

Like Docker, but for WASM.

CAUTION: Rustaceans are doing experiments

Installation

You can download binaries directly from the Releases page.

Or you can install it using cargo:

cargo install wacker
cargo install wacker-cli

Getting started

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
Commit count: 163

cargo fmt