Skip to content

niraj-khatiwada/tauri-bun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 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.

  • Run the client server:
cd ./apps/client
bun dev
  • Run the web server:
cd ./apps/server
bun dev
  • Run the Tauri server:
bun run --filter server compile # Tauri depends on the compiled Bun server binary; run this at least once starting dev server
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.

bun tauri:build

About

Rust based desktop app with Tauri and Bun

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors