diff --git a/README.md b/README.md index 997ae1e..c2dfd22 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Prereqs: - [`static-config`](https://github.com/componentized/static-config) - [`wasm-tools`](https://github.com/bytecodealliance/wasm-tools) - [`wac`](https://github.com/bytecodealliance/wac) -- [`wkg`](https://github.com/bytecodealliance/wasm-pkg-tools) +- [`wkg`](https://github.com/bytecodealliance/wasm-pkg-tools) 0.16+ ```sh ./update-deps.sh diff --git a/build.sh b/build.sh index 71015ae..ff6c63c 100755 --- a/build.sh +++ b/build.sh @@ -12,7 +12,7 @@ rm -rf "${SCRIPT_DIR}/lib/test" && mkdir -p "${SCRIPT_DIR}/lib/test" # wit interface -wkg wit build -o "${SCRIPT_DIR}/lib/interface.wasm" +wkg build -o "${SCRIPT_DIR}/lib/interface.wasm" # core components diff --git a/components/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit b/components/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit index bd613ff..bb646b1 100644 --- a/components/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit +++ b/components/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit @@ -251,13 +251,25 @@ interface watcher { /// 2. Atomic `increment` and CAS (compare-and-swap) operations. /// 3. Batch operations that can reduce the number of round trips to the network. world imports { + /// The `store` capability allows the component to perform eventually consistent operations on + /// the key-value store. import store; + /// The `atomic` capability allows the component to perform atomic / `increment` and CAS + /// (compare-and-swap) operations. import atomics; + /// The `batch` capability allows the component to perform eventually consistent batch + /// operations that can reduce the number of round trips to the network. import batch; } world watch-service { + /// The `store` capability allows the component to perform eventually consistent operations on + /// the key-value store. import store; + /// The `atomic` capability allows the component to perform atomic / `increment` and CAS + /// (compare-and-swap) operations. import atomics; + /// The `batch` capability allows the component to perform eventually consistent batch + /// operations that can reduce the number of round trips to the network. import batch; export watcher; diff --git a/tests/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit b/tests/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit index bd613ff..bb646b1 100644 --- a/tests/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit +++ b/tests/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit @@ -251,13 +251,25 @@ interface watcher { /// 2. Atomic `increment` and CAS (compare-and-swap) operations. /// 3. Batch operations that can reduce the number of round trips to the network. world imports { + /// The `store` capability allows the component to perform eventually consistent operations on + /// the key-value store. import store; + /// The `atomic` capability allows the component to perform atomic / `increment` and CAS + /// (compare-and-swap) operations. import atomics; + /// The `batch` capability allows the component to perform eventually consistent batch + /// operations that can reduce the number of round trips to the network. import batch; } world watch-service { + /// The `store` capability allows the component to perform eventually consistent operations on + /// the key-value store. import store; + /// The `atomic` capability allows the component to perform atomic / `increment` and CAS + /// (compare-and-swap) operations. import atomics; + /// The `batch` capability allows the component to perform eventually consistent batch + /// operations that can reduce the number of round trips to the network. import batch; export watcher; diff --git a/update-deps.sh b/update-deps.sh index aa0df1f..8a08e68 100755 --- a/update-deps.sh +++ b/update-deps.sh @@ -20,10 +20,6 @@ wkg oci pull ghcr.io/componentized/cli/stdout-to-stderr:v0.1.1 -o "${DEPS_DIR}/s wkg oci pull ghcr.io/componentized/valkey/valkey-client:v0.2.2 -o "${DEPS_DIR}/valkey-client.wasm" wkg oci pull ghcr.io/componentized/static-config/factory:v0.2.0 -o "${DEPS_DIR}/static-config-factory.wasm" -wkg wit fetch -(cd components && wkg wit fetch) -(cd tests && wkg wit fetch) - -# TODO remove once wkg consumes wit-component 0.245 -perl -pi -e 's/ map\(/ %map\(/g' components/wit/deps/componentized-valkey/package.wit -perl -pi -e 's/ map\(/ %map\(/g' tests/wit/deps/componentized-valkey/package.wit +wkg fetch +(cd components && wkg fetch) +(cd tests && wkg fetch)