Repository navigation
RFC: enable developers to build Rust/WASM without manually installing Rust (@vooya/preset) #129
Description
Maintainer status — 2026-10-07
The managed toolchain implementation (#146) and packed-consumer acceptance (#156) are merged. @vooya/preset@0.2.0-alpha.0 and its matching provider/adapters are now published on npm; 0.2.0 stable has not been released. The source verification at main 175f8d6 passed on all three platforms: https://github.com/vooyajs/vooya/actions/runs/37327584013 .
Merged PR #159 adds reproducible public-registry acceptance pinned to the published package graph: ordinary development before explicit preparation, a real Vue Component and Store, Rust edits, compiler-error recovery, production browser behavior, doctor/compiler agreement, and concurrent cache reuse. Local macOS arm64 acceptance passed with a fresh npm cache but a reused Rust cache. Fresh-cache Linux/macOS/Windows registry acceptance passed at a9e7692: https://github.com/vooyajs/vooya/actions/runs/37583146228 . All three archived results record firstCommand npm run dev, fresh caches, verified registry package versions, and production browser acceptance. PR #159 merged as 7bc0a50 after final source CI passed: https://github.com/vooyajs/vooya/actions/runs/37585503775 and https://github.com/vooyajs/vooya/actions/runs/37585504046 . Its later snapshot/test-loader fixes do not change the registry acceptance script.
Still open: clean-host qualification without an installed system Rust toolchain, complete first-install interruption/recovery evidence, and confirmation of documented SDK/linker prerequisites. Tests shield ambient Rust commands while retaining the native SDK/linker; this is not evidence of a physically Rust-free host. Unit download recovery and concurrent preparation do not alone prove full-install recovery.
Target: 0.2.0. This does not block the 0.1 beta.
What users should be able to do
A frontend developer should be able to write Rust/WASM with Vooya without first learning how to install and manage Rust.
In an existing Vooya project, the intended setup is:
npm install -D @vooya/preset
npm run dev@vooya/preset is the working package name. It prepares the tools automatically, so the developer can write their own .rs files and use the project's usual dev and build commands. Compilation still happens locally, using tools managed by Vooya.
At proposal time, Vooya could only find and check an existing Rust installation. The published alpha now manages tools; the remaining acceptance work is listed above.
What the preset needs to handle
- Prepare Cargo, rustc, the required standard libraries, the WASM target, and a matching wasm-bindgen CLI for the user's platform.
- Fetch only the tools needed for that machine, verify downloads, and reuse a versioned cache. Interrupted downloads and simultaneous builds should not leave a broken installation.
- Keep tools in a Vooya-owned directory without changing the user's system Rust installation or shell configuration.
- Use the same tools in development, production builds, and
vooya doctor. Reuse the shared build pipeline so bundlers do not each get their own installer. - Keep the existing option to select a system toolchain for users who need it.
Each preset release should pin a tested set of tools. We can track the latest stable Rust through new preset releases; an existing project should not silently get a different compiler the next day. The wasm-bindgen CLI and Rust dependency must stay compatible.
How we know it works
- On clean Windows, macOS, and Linux machines without a system Rust installation, install the preset and build a real Vooya example.
- Edit Rust during development, see the change, and recover after fixing a compiler error (source tarball consumer and local published-registry consumer; three-platform published-registry consumer acceptance passed).
- Reuse downloaded tools on later builds, recover from an interrupted download, and avoid conflicts when two projects prepare the same version.
- Check host linker/SDK requirements too. Ship what we can and clearly document any remaining prerequisites before claiming the setup works on a clean machine.
Related work
- RFC: Define managed, system-toolchain, and precompiled-consumer modes #11 describes the managed-toolchain direction; this issue implements that user experience.
- [Bug] Resolve Cargo, rustc, WASM target, and wasm-bindgen as one coherent toolchain #10 and [Architecture] Extract a bundler-neutral Rust/WASM build pipeline #18 provide the existing toolchain selection and shared build pipeline.
- PR feat(tooling): make Vooya toolchain modes explicit #109 discusses toolchain modes and doctor diagnostics.
- [Artifacts] Ship the Vue and React precompiled component contract #20 covers distributing already-built components. It does not cover this request: users here are writing and compiling their own Rust. This issue does not depend on that packaging work.
- [Release] Rehearse and publish 0.1.0-beta.0 safely #26 remains the 0.1 beta release checklist; this work is planned for 0.2.0.
Activity
[-]Let developers build Rust/WASM without manually installing Rust (@vooya/preset)[/-][+]RFC: enable developers to build Rust/WASM without manually installing Rust (@vooya/preset)[/+]