There's a simple Dockerfile if you don't want to install Rust or run Linux. Run script/bootstrap to build an image and script/build-env to run a command in the build environment. Maybe try script/build-env cargo test.
Dockerfile
script/bootstrap
script/build-env
script/build-env cargo test