Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Bridge dependencies
For the integrator. The bridge adds no new runtime dependencies. It uses
what apps/cua-spaces-web/package.json already lists:
| Package | Kind | Used for |
|---|---|---|
react |
dependency | BridgeProvider, hooks (useSyncExternalStore) |
vite |
devDependency | import.meta.glob (loads the wasm core only when it was built); vite/client types |
vitest, jsdom, @testing-library/react |
devDependency | src/bridge/__tests__ |
@types/node |
devDependency | the tests read the wasm bytes with node:fs |
It does not need @tauri-apps/api. The Tauri adapter calls
window.__TAURI_INTERNALS__.invoke (or window.__TAURI__.core.invoke)
directly.
Scripts to add to package.json
"core": "node scripts/build-core-wasm.mjs",
"predev": "node scripts/build-core-wasm.mjs --optional",
"prebuild": "node scripts/build-core-wasm.mjs",
"pretest": "node scripts/build-core-wasm.mjs --optional"
--optional skips the build, with a message, when the Rust toolchain is
missing, so dev and test still run. The bridge then uses its TypeScript
fallbacks, and the core-only tests are skipped.
Toolchain (for the wasm core)
rustup target add wasm32-unknown-unknown --toolchain 1.97.1cargo install wasm-bindgen-cli --version 0.2.126 --locked
The script puts rustup's proxies first on PATH, so it works even when a
Homebrew rust comes earlier.
Config notes
tsconfig.jsonmust includesrc/bridge/**with"types": ["vite/client", "node"]. Any other package that typecheckscore/index.ts(the Electron app's tests do) listsvite/clientin its owntypesand hasviteas its own devDependency: a triple-slash reference would resolve from this package'snode_modules, which that package's CI does not install. The bridge compiles cleanly understrictandnoUncheckedIndexedAccess.- Vite needs no special config.
wasm-bindgen --target webloadscore_bg.wasmthroughnew URL(..., import.meta.url), which Vite emits as an asset. It is code-split and fetched on firstloadCore(): 4.2 MB raw, 1.0 MB gzipped. - In vitest, set
environment: "jsdom"forsrc/bridge/**/*.test.tsx.