From cd1747c7e3e47d1e8dab777225edd5018785b4f2 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Mon, 13 May 2024 07:56:36 -0500 Subject: [PATCH 1/3] updated README with plug command --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 01a73e1..525f06e 100644 --- a/README.md +++ b/README.md @@ -88,10 +88,26 @@ cargo install wac-cli The `wac` CLI tool has three commands: +* `wac plug` - Plugs the imports of a component with one or more other components. * `wac parse` - Parses a composition into a JSON representation of the AST. * `wac resolve` - Resolves a composition into a JSON representation. * `wac encode` - Encodes a WAC source file as a WebAssembly component. +### Quick & Easy Compositions + +To do simple compositions, use the `wac plug` command: + +``` +wac plug my-socket.wasm --plug my-plug.wasm -o plugged.wasm +``` + +or mixing in packages published to a Warg regsitry: + +``` +wac plug my-namespace:package-name --plug some-namespace:other-package-name -o plugged.wasm +``` + + ### Encoding Compositions To encode a composition, use the `wac encode` command: @@ -150,6 +166,6 @@ wac encode --dep foo:bar=./baz.wasm -o output.wasm input.wac By default, dependencies must be binary-encoded WebAssembly components; to enable support for WAT files, use the `wat` build-time feature. -If the `registry` build-time feature is enabled, then dependencies may be +Unless built without default features (explicitly the `registry` feature), then dependencies may be automatically resolved from a Warg registry and do not need to exist in the `deps` subdirectory or specified via the `--dep` CLI option. From 3108540c5bc0b46615ec023854f6c37fcead96e5 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Mon, 13 May 2024 07:58:57 -0500 Subject: [PATCH 2/3] reworded README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 525f06e..0e5114a 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,6 @@ wac encode --dep foo:bar=./baz.wasm -o output.wasm input.wac By default, dependencies must be binary-encoded WebAssembly components; to enable support for WAT files, use the `wat` build-time feature. -Unless built without default features (explicitly the `registry` feature), then dependencies may be +If built with default features, then dependencies may be automatically resolved from a Warg registry and do not need to exist in the `deps` subdirectory or specified via the `--dep` CLI option. From 033ac38c6aad947d12f67d352871b21a880174e2 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Mon, 13 May 2024 08:15:31 -0500 Subject: [PATCH 3/3] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e5114a..dcd1646 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ To do simple compositions, use the `wac plug` command: wac plug my-socket.wasm --plug my-plug.wasm -o plugged.wasm ``` -or mixing in packages published to a Warg regsitry: +Or mixing in packages published to a Warg registry: ``` wac plug my-namespace:package-name --plug some-namespace:other-package-name -o plugged.wasm