Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tauri + Bun

Read the blogpost for the complete implementation details.

Note

Please switch to main branch to view the old setup.

This repo shows you how to setup a cross-platform desktop app using Tauri but with Bun. We create a bi-directional RPC between Bun server and our Tauri client using kkrpc. This setup requires almost zero extra code in Rust backend aside from Tauri Sidecar configuration.

A Tauri + Deno version is available here.

Development

Install Bun. The project uses Bun workspace and everything runs using Bun.

  • Install packages:
bun install
  • Run the client server:
bun run --filter client dev
  • Run the web server: The web server is only needed during development mode. It's not used on the release build of the app.
bun run --filter server dev
  • Run the Tauri server:

Tauri depends on the compiled Bun server binary; run this at least once before starting the dev server:

bun run --filter server compile
bun tauri:dev

Production

In production, the Bun web server is compiled as a standalone binary and this binary is embedded as a sidecar in Tauri automatically.

bun tauri:build

About

Rust based desktop app with Tauri and Bun

Resources

Stars

30 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages