- Spin CLI (
3.4.0or newer) - Rust (
1.8.9or newer) to compile the host - WebAssembly Composition Tooling (
wac)
To compose a new proxy with a custom transformer component, use the commands outlined here:
# Assume a obfuscate component has been implement with Rust in ./components/obfuscate
cd components/obfuscate
cargo build --target wasm32-wasip2 --release
cd ../..
cd host
spin build
#Compose the final application
wac plug --plug ./transformers/rust-transformer/target/wasm32-wasip2/release/obfuscate.wasm \
target/wasm32-wasip2/release/host.wasm \
-o composed.wasmYou can find examples of transformers in the /transformers directory.
Use the spin up command to run the proxy on your local machine.
A composed.wasm has been added to the Git repo, to run that "do-nothing" proxy simply execute spin up in the ./host directory