SKILLEX

HuakunShen / tauri-plugin-js

tauri-js-runtime

Add JavaScript runtime backend capabilities to Tauri v2 desktop apps. Covers both using the tauri-plugin-js plugin and building from scratch. Use when integrating Bun, Node.js, or Deno as backend processes in Tauri, setting up type-safe RPC between frontend and JS runtimes, creating Electron-like architectures in Tauri, or managing child processes with stdio communication.

Give Tauri apps full JS runtime backends (Bun, Node.js, Deno) with type-safe bidirectional RPC. This covers two approaches: using the tauri-plugin-js plugin, and building the integration from scratch.

When to Use

  • User wants to run JS/TS backend code from a Tauri desktop app
  • User asks about Electron alternatives or "Electron-like" features in Tauri
  • User needs to spawn/manage child processes (Bun, Node, Deno) from Rust
  • User wants type-safe RPC between a Tauri webview and a JS runtime
  • User needs stdio-based IPC between Rust and a child process
  • User asks about kkrpc integration with Tauri
  • User wants multi-window apps where windows share backend processes
  • User needs runtime detection (which runtimes are installed, paths, versions)
  • User wants to ship a Tauri app without requiring JS runtimes on user machines (compiled sidecars)
  • User asks about bun build --compile or deno compile with Tauri

Core Architecture

Frontend (Webview)  <-- Tauri Events -->  Rust Core  <-- stdio -->  JS Runtime

SKILL.md