Build a small warehouse application, drive it from Rust, and save a recording of the result.
The Wax side of this example is on the Embedding Wax overview. Read it first to understand Wax's three communication paths and their recording behaviour.
Download the complete example (.tar.gz). Extract it and open a terminal in the extracted directory. It includes the Wax source, manifest, host source, and host build files used below.
Install Wax and add its tools to your PATH. You also need: Rust and Cargo 1.70 or newer (edition 2021).
Generate the Rust binding.
Ask the Wax compiler for a Rust binding, then build the project. The generated code contains the typed host functions, channels, and APIs declared in the Wax source on the embedding overview.
wax.json
$ wax build
The Rust side.
The host connects the services Wax needs, stages channel data, runs frames, calls Wax APIs, and writes the recording.
Host/rust/src/main.rs
Run it.
Build the Wax project, run the Rust host, then open the resulting warehouse.wxs recording in the debugger.
warehouse
Host guides.
Choose a host language to wire this Wax interface into an application.