@@ -32,22 +32,22 @@ define BUILD_COMPONENT
3232lib/$1.wasm: $4 Cargo.toml Cargo.lock components/wit/deps $(shell find components/wit -type f) $(shell find components/$1 -type f)
3333 cargo $3 component build -p $1 --target $2 --release
3434 $(if $(findstring $1,cli) ,
35- wac plug target/$2/release/$(subst -,_,$1) .wasm --plug lib/valkey-client .wasm -o lib/$1.wasm,
35+ wac plug target/$2/release/$(subst -,_,$1) .wasm --plug lib/valkey-ops .wasm -o lib/$1.wasm,
3636 cp target/$2/release/$(subst -,_,$1) .wasm lib/$1.wasm)
3737 cp components/$1/README.md lib/$1.wasm.md
3838
3939lib/$1.debug.wasm: $5 Cargo.toml Cargo.lock wit/deps $(shell find components/$1 -type f)
4040 cargo +nightly component build -p $1 --target wasm32-wasip2
4141 $(if $(findstring $1,cli) ,
42- wac plug target/$2/debug/$(subst -,_,$1) .wasm --plug lib/valkey-client .debug.wasm -o lib/$1.debug.wasm,
42+ wac plug target/$2/debug/$(subst -,_,$1) .wasm --plug lib/valkey-ops .debug.wasm -o lib/$1.debug.wasm,
4343 cp target/wasm32-wasip2/debug/$(subst -,_,$1) .wasm lib/$1.debug.wasm)
4444 cp components/$1/README.md lib/$1.debug.wasm.md
4545
4646endef
4747
4848$(eval $(call BUILD_COMPONENT,valkey-ops,wasm32-unknown-unknown))
4949$(eval $(call BUILD_COMPONENT,keyvalue-to-valkey,wasm32-unknown-unknown))
50- $(eval $(call BUILD_COMPONENT,cli,wasm32-wasip2,+nightly,lib/valkey-client .wasm,lib/valkey-client .debug.wasm))
50+ $(eval $(call BUILD_COMPONENT,cli,wasm32-wasip2,+nightly,lib/valkey-ops .wasm,lib/valkey-ops .debug.wasm))
5151
5252lib/valkey-client.wasm : components/valkey-client.wac lib/valkey-ops.wasm lib/keyvalue-to-valkey.wasm
5353 wac compose -o lib/valkey-client.wasm \
@@ -72,6 +72,10 @@ wit/deps: wkg.toml $(shell find wit -type f -name "*.wit" -not -path "deps")
7272components/wit/deps : wit/deps components/wkg.toml $(shell find components/wit -type f -name "* .wit" -not -path "deps")
7373 (cd components && wkg wit fetch)
7474
75+ .PHONY : test
76+ test :
77+ @$(MAKE ) run cmd=" hello"
78+
7579.PHONY : publish
7680publish : $(shell find lib -type f -name "* .wasm" | sed -e 's:^lib/:publish-:g')
7781
0 commit comments