TL;DR

WebAssembly Compositions の略。WebAssembly Component どうしを合成し、新しい Component を作るための CLI ツールとクレート。

仕組み

Cargo でインストールする。

$ cargo install wac-cli

主なサブコマンドは次のとおり。

$ wac help
Tool for working with WebAssembly compositions
 
Usage: wac <COMMAND>
 
Commands:
  plug     Plugs the exports of any number of 'plug' components into the imports of a 'socket' component
  compose  Compose WebAssembly components using the provided WAC source file
  parse    Parses a WAC source file into a JSON AST representation
  resolve  Resolves a WAC source file into a DOT representation
  targets  Verifies that a given WebAssembly component targets a world
  help     Print this message or the help of the given subcommand(s)

plug は、いくつかの Component(plug)が export するものを、別の Component(socket)の import に差し込む。compose は、WAC のソースファイルに書いた構成に従って Component を合成する。

例

関連

出典