Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Like Docker, but for WASM.

License

NotificationsYou must be signed in to change notification settings

wacker-dev/wacker

Repository files navigation

Like Docker, but for WASM.

Installation

You can download binaries directly from theReleases page.

Or you can install it usingcargo:

cargo install wacker-daemoncargo install wacker-cli

Getting started

Start the wacker daemon:

$ wackerd[2023-11-22 07:25:31 INFO wackerd] server listening on "/Users/user/.wacker/wacker.sock"

Run a WebAssembly program:

$ wacker run hello.wasm$ wacker run time.wasm

Wherehello.wasm is a simple WASM program that prints outHello, world! and exits, andtime.wasm is a long-running program that constantly prints out the current time.

You can find more WASI program examples athttps://github.com/wacker-dev/wasi-examples.

Serve anHTTP WebAssembly program:

$ wacker serve hello_wasi_http.wasm --addr 127.0.0.1:8081

The path can be a local file path or a URL, eg:

$ wacker run https://raw.githubusercontent.com/wacker-dev/wacker/main/wacker/tests/wasm/hello.wasm

List running programs:

$ wacker listID                        PATH                   STATUS     ADDRESShello-w0AqXnf             hello.wasm             Finishedtime-xhQVmjU              time.wasm              Runninghello_wasi_http-luf1vz6   hello_wasi_http.wasm   Running    127.0.0.1:8081

Fetch the logs:

$ wacker logs hello-w0AqXnfHello, world!$ wacker logs -f --tail 5 time-xhQVmjUcurrent time: 2023-11-22 07:42:34current time: 2023-11-22 07:42:35current time: 2023-11-22 07:42:36current time: 2023-11-22 07:42:37current time: 2023-11-22 07:42:38

And you can also stop/restart/delete the program:

$ wacker stop time-xhQVmjU$ wacker restart time-xhQVmjU$ wacker delete/rm time-xhQVmjU

Usage for wacker cli:

$ wacker -hwacker clientUsage: wacker <COMMAND>Commands:  run      Runs a WebAssembly program  serve    Serves an HTTP WebAssembly program  list     Lists running WebAssembly programs [aliases: ps]  stop     Stops WebAssembly programs  restart  Restarts WebAssembly programs  delete   Deletes WebAssembly programs [aliases: rm]  logs     Fetches logs of a program [aliases: log]  help     Print this message or the help of the given subcommand(s)Options:  -h, --help     Print help  -V, --version  Print version

[8]ページ先頭

©2009-2025 Movatter.jp