
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@r1-runtime/vite-plugin
Advanced tools
Official Vite plugin for R1 — automates Rust→WASM compilation and Tauri import patching.
Official Vite plugin for R1 — automates Rust→WASM compilation and Tauri import patching.
src-tauri/ Rust code to WASM during buildnpm install --save-dev @r1-runtime/vite-plugin
Add to your vite.config.ts:
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { r1Plugin } from '@r1-runtime/vite-plugin';
export default defineConfig({
plugins: [
r1Plugin({ rustSrc: './src-tauri' }),
react(),
],
});
interface R1PluginOptions {
/**
* Path to Rust source directory
* @default './src-tauri'
*/
rustSrc?: string;
/**
* WASM output directory (relative to rustSrc)
* @default './target/wasm32-unknown-unknown/release'
*/
wasmOut?: string;
/**
* Enable debug logging
* @default false
*/
debug?: boolean;
}
During build, the plugin:
cargo build --target wasm32-unknown-unknown --releasewasm-bindgen to generate JavaScript bindingspublic/wasm/ directoryRewrites Tauri imports to use R1 shims:
// Before:
import { invoke } from '@tauri-apps/api/core';
import { readTextFile } from '@tauri-apps/api/fs';
// After (automatically):
import { invoke } from '@r1-runtime/apis/core';
import { readTextFile } from '@r1-runtime/apis/fs';
Injects R1 runtime initialization into your HTML:
<script type="module">
import { R1Runtime } from '@r1-runtime/core';
const runtime = new R1Runtime();
await runtime.boot();
await runtime.loadBackend('/wasm/your_app.wasm');
window.dispatchEvent(new Event('r1:ready'));
</script>
After running npm run build, your dist/ folder will contain:
dist/
├── index.html
├── assets/
│ ├── index-[hash].js
│ └── index-[hash].css
└── wasm/
├── your_app_bg.wasm
└── your_app.js
Deploy this folder to any static hosting service!
The plugin automatically patches imports for:
@tauri-apps/api/core@tauri-apps/api/fs@tauri-apps/api/path@tauri-apps/api/event@tauri-apps/api/dialog@tauri-apps/api/os@tauri-apps/api/clipboard@tauri-apps/api/window@tauri-apps/plugin-store@tauri-apps/plugin-sqlwasm32-unknown-unknown targetwasm-bindgen-cli installedInstall it:
cargo install wasm-bindgen-cli
Add the target:
rustup target add wasm32-unknown-unknown
Check that:
Cargo.toml has crate-type = ["cdylib"]rustSrc option points to correct directoryMIT © 2026 R1 Runtime Team
FAQs
Official Vite plugin for R1 — automates Rust→WASM compilation and Tauri import patching.
The npm package @r1-runtime/vite-plugin receives a total of 18 weekly downloads. As such, @r1-runtime/vite-plugin popularity was classified as not popular.
We found that @r1-runtime/vite-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.