Files
blitzkit/packages/app/src-tauri/src/main.rs
T

27 lines
657 B
Rust
Raw Normal View History

2025-09-28 13:09:03 -05:00
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
2025-09-29 13:30:10 -05:00
use std::process::{Command, Stdio};
use tauri::Manager;
2025-09-28 13:09:03 -05:00
fn main() {
2025-09-29 13:30:10 -05:00
tauri::Builder::default()
.setup(|app| {
let app_handle = app.handle();
let entry = app_handle
.path_resolver()
.resolve_resource("../../dist/website/server/entry.mjs")
.expect("failed to resolve server.ts");
Command::new("bun")
.arg("run")
.arg(entry)
.stderr(Stdio::null())
.spawn()
.expect("failed to start Bun server");
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running Tauri app");
2025-09-28 13:09:03 -05:00
}