@r1-runtime/core
v0.3.4
Published
Main thread runtime for R1 — IPC bridge, EventBus, and boot synchronization.
Maintainers
Readme
@r1-runtime/core
Main thread runtime for R1 — IPC bridge, EventBus, and boot synchronization.
Features
- IPC Bridge: Patches
window.__TAURI_INTERNALS__for seamlessinvoke()calls - Event System: Full Tauri event bridge (emit/listen)
- Boot Orchestration: Manages Worker initialization and WASM loading
- Zero Frontend Changes: Your existing Tauri frontend code works unchanged
Installation
npm install @r1-runtime/core @r1-runtime/apisUsage
import { R1Runtime } from '@r1-runtime/core';
// Initialize runtime
const runtime = new R1Runtime();
await runtime.boot();
// Your existing Tauri code now works:
import { invoke } from '@tauri-apps/api/core';
const result = await invoke('greet', { name: 'World' });API
R1Runtime
boot()- Initialize runtime and load WASM backendinvoke(cmd, args)- Call Rust commandemit(event, payload)- Emit event to Rustlisten(event, handler)- Listen for events from Rust
How It Works
The runtime:
- Registers a Service Worker for
asset://protocol - Spawns a Worker for WASM execution
- Patches
window.__TAURI_INTERNALS__for IPC - Loads your Rust backend as WASM
- Bridges all
invoke()calls to the Worker
License
MIT © 2026 R1 Runtime Team
