@@ -65,26 +65,26 @@ wac encode -o output.wasm input.wac
6565
6666This will encode ` input.wac ` as a WebAssembly component named ` output.wasm ` .
6767
68- By default, ` wac ` will import dependencies rather than defining (i.e.
69- embedding) them in the output component; to define dependencies in the output
70- component, use the ` --define ` flag:
68+ #### Dependencies
69+
70+ By default, ` wac ` will create a component that embeds its dependencies (i.e. packages
71+ referenced in a WAC source file) inside of itself rather than importing those dependencies;
72+ to cause dependencies to be imported in the output component, use the
73+ ` --import-dependencies ` flag:
7174
7275```
73- wac encode --define -o output.wasm input.wac
76+ wac encode --import-dependencies -o output.wasm input.wac
7477```
7578
76- #### Dependencies
77-
78- Dependencies (i.e. packages referenced in a WAC source file) may be located
79- within a ` deps ` subdirectory, with an expected structure of:
79+ Dependencies may be located within a ` deps ` subdirectory, with an expected structure of:
8080
8181```
8282deps/
8383├─ <namespace>/
8484│ ├─ <package>.wasm
8585``````
86- If the `wit` build-time feature is enabled, the dependency may be a directory
87- containing a WIT package:
86+
87+ The dependency may be also be a WIT file or a directory containing a WIT package:
8888
8989```
9090deps/
9797The `--deps-dir` CLI option may be used to specify a different directory to
9898search for dependencies.
9999
100- Dependencies may also be specified with the `--dep` CLI option:
100+ The location of specific dependencies may also be specified with the `--dep` CLI option:
101101
102102```
103103wac encode --dep foo: bar =./baz.wasm -o output.wasm input.wac
0 commit comments