#wasi #wacker #docker #run-time #api

yanked wacker-api

wacker API

3 releases

0.1.3 Dec 8, 2023
0.1.2 Dec 8, 2023
0.1.1 Dec 6, 2023
0.1.0 Nov 23, 2023

#188 in #wasi

Download history 6/week @ 2024-02-24 1/week @ 2024-03-02 5/week @ 2024-03-09 6/week @ 2024-03-16 10/week @ 2024-03-30 2/week @ 2024-04-06 134/week @ 2024-04-20

146 downloads per month

Apache-2.0

4KB

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

Dependencies

~4.5–6MB
~106K SLoC