Iterate
This section describes how you can iteratively build and test your component functionality.
wash dev
wash dev
starts a local wasmCloud host (if you don't already have one started), builds your component, launches providers for well-known capabilities, and automatically registers your component with the host. It will also watch your component source code for
changes, recompile, and update the component in the host.
This is a great way to get started with wasmCloud development, and we recommend it for all new components.
You can run the command with:
wash dev
The output should look like the following:
⚠️ No running wasmcloud host detected (PID file missing), starting a new host...
🔧 Successfully started wasmCloud instance
⏳ Waiting for host to become reachable...
✅ Found single host w/ ID [NANYXG3E44U4PNBHROWR3KE6V6YK3AP6IJTZVOKH47MGHQJM7ICHG6HK]
🚧 Starting project build
✅ successfully built project at [/Users/wasmcloud/hello/build/http-hello-world_s.wasm]
👀 watching for file changes (press Ctrl+c to stop)...
This will watch your project's files and, whenever there's a change, recompile and update the component in the host. Try iterating through a few changes in the Add Features section to see how it works.
If a component is handling a message when an update occurs, the host waits for the message handler to complete, then swaps in the newer WebAssembly component before the next message is processed.