This repository was archived by the owner on Aug 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·27 lines (20 loc) · 1.34 KB
/
build.sh
File metadata and controls
executable file
·27 lines (20 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -euo pipefail
cargo component build -p calculator --target wasm32-unknown-unknown --release
cargo component build -p counter --target wasm32-unknown-unknown --release
cargo component build -p flights --target wasm32-unknown-unknown --release
cargo component build -p greeter --target wasm32-unknown-unknown --release
cargo component build -p hotels --target wasm32-unknown-unknown --release
cargo component build -p incrementor --target wasm32-unknown-unknown --release
cargo component build -p rest-client --target wasm32-unknown-unknown --release
cp target/wasm32-unknown-unknown/release/*.wasm lib/
# rely on default greeting "Hello"
static-config -o ./lib/empty-config.wasm
wac plug ./lib/greeter.wasm --plug ./lib/empty-config.wasm -o ./lib/hello.wasm
# provide greeting value through wasi:config/store-exporting component
static-config -p greeting="Aloha" -o ./lib/aloha-config.wasm
wac plug ./lib/greeter.wasm --plug ./lib/aloha-config.wasm -o ./lib/aloha.wasm
wkg oci pull -o ./lib/valkey-client.wasm ghcr.io/componentized/valkey/valkey-client:v0.1.1
wac plug ./lib/incrementor.wasm --plug ./lib/valkey-client.wasm -o ./lib/valkey-incrementor.wasm
wac plug ./lib/valkey-incrementor.wasm --plug ./lib/empty-config.wasm -o ./lib/default-incrementor.wasm
wac plug ./lib/counter.wasm --plug ./lib/valkey-incrementor.wasm -o ./lib/valkey-counter.wasm