⚠️ DISCONTINUED This project is discontinued and will no longer receive updates or support.
▶ Live Demo — a real Tauri todo app with a React + Rust + SQLite backend, running entirely in your browser. (Note: Demo may no longer be available as the project is discontinued.)
R1 is an experimental proof-of-concept (POC) designed to run lightweight, self-contained Tauri applications as static websites. It compiles the Rust backend to WebAssembly (wasm32-unknown-unknown via wasm-pack build --target web) and proxies Tauri's system calls to browser-level shims.
Contrary to early marketing claims, R1 cannot run arbitrary or unmodified Tauri apps. Standard desktop applications with native dependencies or complex OS integrations require significant manual rewrite, removal of incompatible dependencies, and custom porting to run on this runtime.
If you design or heavily refactor your Tauri app specifically for this runtime, the following features are functional:
| Feature | What is actually supported |
|---|---|
Simple invoke() Calls |
Passing JSON strings back and forth between the JS frontend and the WASM-compiled Rust backend works. |
Rust std::fs (Virtualized) |
File writes and reads inside Rust are intercepted by a WASI shim and routed to an in-memory Virtual File System (VFS) backed by the Origin Private File System (OPFS). |
| Event Bridge | Emitting events from JS to Rust and listening to Rust-emitted events in JS (emit/listen) is supported. |
| Self-Contained SQLite | SQLite database operations persist in the browser's OPFS sandbox. |
| Virtual Window Manager | Multiple simulated OS-like windows can be rendered within a single browser tab using macOS/Windows 11 CSS themes. |
| Mock API Shims | Basic subset of Tauri APIs (fs, event, store, os, path, dialog, clipboard) are partially shimmed to use equivalent Web/browser APIs. |
Because the entire application runs inside the browser's strict sandbox, many native features are fundamentally impossible:
- Incompatible Rust Crates: Any crate that depends on native C-bindings, OS system APIs, native cryptography, thread-pooling, or platform-specific libraries will fail to compile to WASM or crash at runtime.
- No Child Processes: Commands like
Command::newor Tauri'sshell::executeare non-functional and stubbed as no-ops. - No Raw Sockets or TCP/UDP: Standard networking using
std::netis unsupported. All external network calls must use standard Webfetchor the shimmed HTTP API. - No Multi-Threading: The WASM runtime in the Web Worker is strictly single-threaded. Multi-threaded asynchronous features or parallel loops will cause deadlocks or panic.
- No Native System UI: Features like the system tray, global shortcuts, native file dialogues, native notifications, window transparency, and multi-window management do not exist and are simulated or disabled.
To test a compatible or heavily-simplified app:
cd your-tauri-app
npx @r1-runtime/cli sync
npm install
npm run build
npx serve dist -l 3000Open http://localhost:3000 and press Ctrl+F5 on first load.
npm create tauri-app@latest my-app -- --template react-ts --yes
cd my-app
npx @r1-runtime/cli sync
npm install
npm run build
npx serve dist -l 3000See GETTING_STARTED.md for a full walkthrough.
The browser can't run a native Rust binary. R1 solves this with a layered architecture:
| Layer | What it does |
|---|---|
| Vite Plugin | Compiles src-tauri/ to WebAssembly during npm run build |
| Kernel Worker | Runs all WASM in a Web Worker — UI thread never blocks |
| WASI Shim | Intercepts std::fs calls and redirects them to OPFS |
| IPC Bridge | Patches window.__TAURI_INTERNALS__ so invoke() works unchanged |
| Event Bridge | Lets Rust emit events back to JavaScript via listen() |
| Service Worker | Intercepts asset:// URLs and serves files from the VFS |
| VFS | In-memory cache backed by OPFS for persistent storage |
Your Frontend (React/Vue/Svelte)
│ invoke('command', args)
▼
IPC Bridge ──► Kernel Worker ──► WASM (your Rust code)
│ │
VFS WASI Shim
(OPFS) (std::fs → OPFS)
All packages are live on npm and crates.io.
| Package | Version | Description |
|---|---|---|
@r1-runtime/kernel |
0.3.2 | WASM orchestration, VFS, WASI shim |
@r1-runtime/core |
0.3.4 | IPC bridge, EventBus, boot runtime |
@r1-runtime/apis |
0.3.2 | Tauri API shims (fs, event, dialog…) |
@r1-runtime/sw |
0.3.1 | Service Worker for asset:// protocol |
@r1-runtime/window |
0.3.1 | Virtual Window Manager + OS themes |
@r1-runtime/vite-plugin |
0.3.5 | Vite plugin — ships pre-built workers, Rust compilation |
@r1-runtime/cli |
0.3.7 | Migration CLI: npx @r1-runtime/cli sync |
| Crate | Version | Description |
|---|---|---|
r1-macros |
0.3.0 | #[r1::command] proc macro |
npx @r1-runtime/cli sync automatically patches your Tauri project:
build.rs— emptied tofn main() {}(prevents native build logic from breaking WASM)Cargo.toml— adds WASM deps, moves native deps tocfg(not(target_arch = "wasm32"))vite.config.ts— addsr1Plugin({ rustSrc: './src-tauri' })package.json— adds@r1-runtime/core,@r1-runtime/apis,@r1-runtime/vite-plugin- SQL imports — converts
@tauri-apps/plugin-sql→@r1-runtime/apis/sql - Rust commands — rewrites
#[tauri::command]to#[r1::command]macro (addspub, removesstaticlibfrom crate-type)
All modified files get a .r1-backup copy before changes are applied.
r1-tauriweb-runtime-v1/
├── packages/
│ ├── kernel/ — WASM orchestration, VFS, WASI shim
│ ├── core/ — IPC bridge, EventBus, R1Runtime
│ ├── apis/ — Tauri API implementations
│ ├── sw/ — Service Worker
│ ├── window/ — Virtual Window Manager
│ ├── vite-plugin/ — Build tooling
│ ├── cli/ — Migration tool
│ └── wasm-template/ — Rust WASM template with example commands
├── apps/
│ ├── todo-demo/ — Live demo app (React + Rust + SQLite)
│ ├── phase6-test-app/ — TaskFlow: full SQLite CRUD demo
│ ├── demo/ — Technical showcase
│ ├── test-greet/ — Tauri v2 greet test app
│ ├── cli-test-app/ — CLI migration test app
│ └── r1-notes-e2e/ — E2E notes app with SQLite
├── templates/
│ └── r1-macros/ — Proc macro crate source
└── tests/
└── fixtures/ — Pre-compiled .wasm test binaries
| Document | What's in it |
|---|---|
| GETTING_STARTED.md | Step-by-step: create and run your first R1 app |
| USAGE_GUIDE.md | Complete API reference and patterns |
| DEVELOPER_GUIDE.md | Internal architecture and package internals |
| CONTRIBUTING.md | How to contribute and report bugs |
| CHANGELOG.md | Version history |
R1 ships with prompt files and a skill document for AI coding assistants (Cursor, Claude, Copilot). These give any AI agent full context about R1's architecture so it can make accurate changes.
All AI resources are in the PROMTS AND SKILL/ directory:
| File | Purpose |
|---|---|
R1_SKILL.md |
Master knowledge base — read this first |
MIGRATE_APP.md |
Prompt for migrating an existing Tauri app |
NEW_APP.md |
Prompt for building a new R1 app |
NEW_APP_SQLITE.md |
Prompt for building a new app with SQLite |
DEBUG.md |
Prompt for debugging build and runtime errors |
AI_GUIDE.md |
How to use AI agents with R1 |
AGPL-3.0 © 2026 R1 Runtime Team