Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions components/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 12 additions & 0 deletions tests/wit/deps/wasi-keyvalue-0.2.0-draft2/package.wit
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 3 additions & 7 deletions update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)