Skip to main content

run

Function run 

Source
pub fn run(release: bool) -> Result<(), String>
Expand description

Run the workspace’s tests.

cargo nextest run is the test runner: it gives every test its own process, so one test’s device, logger or panic cannot reach another’s. Nextest does not run doctests, so those get a cargo test --doc pass of their own — the two commands together are what CI runs.

The targets are named one by one rather than with --all-targets, which would also sweep in the benchmarks. A benchmark binary is not a test binary: it has no test harness and its main is the benchmark, so nextest cannot list it — cargo bench is what runs those.

The suite runs twice: once with the default tier — the WebGPU baseline’s limits, which every implementation guarantees — and once with UNLIT3D_DEVICE_TIER=webgl2, which narrows every headless device to the limits and missing downlevel capabilities WebGL2 has. That second pass is what exercises the paths a browser takes — the shader’s arrays read through textures instead of storage buffers, and a draw’s vertex offset baked into its indices instead of carried in base_vertex — on a machine whose native backend is Vulkan, Metal or DX12. A real WebGL2 device is not required for it, and cannot be, since none is reachable from a headless test.