feat: add tauri desktop shell

This commit is contained in:
2026-07-18 16:44:11 +08:00
parent 7a2af1b938
commit 8fc8298a62
8 changed files with 353 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
[package]
name = "senlinai_workbench"
version = "0.1.0"
description = "SenlinAI project workbench desktop shell"
authors = ["SenlinAI"]
edition = "2021"
[lib]
name = "senlinai_workbench_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

View File

@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}

View File

@@ -0,0 +1,7 @@
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.run(tauri::generate_context!())
.expect("error while running SenlinAI Workbench");
}

View File

@@ -0,0 +1,3 @@
fn main() {
senlinai_workbench_lib::run()
}

View File

@@ -0,0 +1,28 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "SenlinAI Workbench",
"version": "0.1.0",
"identifier": "ai.senlin.workbench",
"build": {
"frontendDist": "../../web/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "cd ../web && npm run dev",
"beforeBuildCommand": "cd ../web && npm run build"
},
"app": {
"windows": [
{
"title": "项目工作台",
"width": 1280,
"height": 820
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all"
}
}