🍶
Wadoコトハジメ2026年1月版
はじめに
gfxさんが新しいプログラミング言語"Wado" (ワドゥ)を作っていたので動かしてみたいと思います。
RustのCargoを使った2026年1月時点の動かし方ですので、今後動かし方が変わるかもしれません。
インストール
RustのDevcontainerでGitHubから直接ビルドしてインストールします。
devcontainer.json
{
"name": "Rust",
"image": "mcr.microsoft.com/devcontainers/rust:2-1-trixie",
"remoteUser": "root"
}
$ rustc -V
rustc 1.93.0 (254b59607 2026-01-19)
$ cargo -V
cargo 1.93.0 (083ac5135 2025-12-15)
cargo install --git=https://github.com/wado-lang/wado.git wado-cli
Wadoのビルドとインストールが終わるまでしばらく待ちます。
$ wado --version
wado 0.1.0
$ wado --help
Usage: wado <command> [options]
Commands:
compile [options] <file.wado> Compile a Wado source file
run [options] <file.wado> Compile and run a Wado CLI program
serve [options] <file.wado> Compile and serve a Wado HTTP service
test [options] <files...> Run tests in Wado source files
format [options] <file.wado> Format a Wado source file
dump [options] <file.wado> Dump compiler internal state
syntax [options] Generate syntax definition files
Compile options:
-o <file> Output file path (default: <input>.wasm)
--format <fmt> Output format: wasm, wat (default: guessed from -o extension)
Run options:
-O<n> Optimization level: -O0, -O1, -O2, -O3, -Os
Serve options:
--addr <addr> Address to listen on (default: 0.0.0.0:8080)
-O<n> Optimization level: -O0, -O1, -O2, -O3, -Os
Test options:
-f, --filter <pattern> Filter tests by name pattern
-p, --parallel <N> Number of parallel workers (default: num CPUs)
Format options:
-w, --write Write formatted output back to file
--check Check if file is formatted (exit 1 if not)
Dump options:
--ast Show the AST
--symbols Show the symbol table
--modules Show loaded modules
--all Show all information (default)
Global options:
--help Show this help message
--version Show version information
CLI
まずはHello, World!を表示してみます。
touch hello.wado
hello.wado
#!/usr/bin/env -S wado run
use { println, Stdout } from "core:cli";
export fn run() with Stdout {
println("Hello, World!");
}
$ wado run hello.wado
Hello, World!
表示できました。
このコードの1行目はShebangなので、実行権限をつけてあげれば直接実行することもできます。
$ chmod 755 hello.wado
$ ./hello.wado
Hello, World!
HTTP (WIP)
続いてHTTPサーバーを動かしてみたいと思います。
touch ok.wado
ok.wado
#!/usr/bin/env -S wado serve
use { Request, Response, ErrorCode } from "wasi:http";
export fn handle(request: Request) -> Result<Response, ErrorCode> {
return Result::<Response, ErrorCode>::Ok(());
}
$ wado serve ok.wado
HTTP server listening on http://0.0.0.0:8080/
Press Ctrl+C to stop
$ chmod 755 ok.wado
$ ./ok.wado
HTTP server listening on http://0.0.0.0:8080/
Press Ctrl+C to stop
起動できました。
curlで確認すると200 OKが返ってくることがわかります。
$ curl -i http://localhost:8080/
HTTP/1.1 200 OK
content-length: 0
date: Mon, 02 Feb 2026 15:00:00 GMT
おわりに
WadoはRustやWASM, WASIの知識があれば簡単に使えることが分かりました。
ZigやMoonBitよりSyntaxが分かりやすく、Rustのように書ける非常に軽くて速いスクリプト言語のような印象を受けたので、今後に期待したいです。
CHANGELOG
- 2026/02/03
wado --helpを更新。exportを追加。wado run --world=wasi:http/serviceをwado serveに変更。cargo install wasmtime-cliが不要になったため削除。
Discussion