Tauri desktop shell (reuses web/ frontend, connects to OpenAI-compatible endpoint, isolated in desktop/) (#24)

* Add Tauri desktop shell

* Update desktop setup after web UI merge

* Declare desktop bundle icons
This commit is contained in:
ZacharyZcR
2026-07-12 07:40:21 +08:00
committed by GitHub
parent 57730f6196
commit 5198feec7c
17 changed files with 4525 additions and 0 deletions
+4358
View File
File diff suppressed because it is too large Load Diff
+17
View File
@@ -0,0 +1,17 @@
[package]
name = "colibri-desktop"
version = "0.1.0"
description = "Native desktop shell for the colibri inference engine"
authors = ["colibri contributors"]
edition = "2024"
rust-version = "1.85"
[lib]
name = "colibri_desktop_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2.6.3", features = [] }
[dependencies]
tauri = { version = "2.11.5", features = [] }
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
@@ -0,0 +1,7 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Default capability for the main colibri window",
"windows": ["main"],
"permissions": ["core:default"]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

+6
View File
@@ -0,0 +1,6 @@
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.run(tauri::generate_context!())
.expect("failed to run the colibri desktop application");
}
+5
View File
@@ -0,0 +1,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
colibri_desktop_lib::run();
}
+42
View File
@@ -0,0 +1,42 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "colibrì",
"version": "0.1.0",
"identifier": "org.colibri.desktop",
"build": {
"beforeDevCommand": "npm --prefix ../web run dev",
"devUrl": "http://localhost:5173",
"beforeBuildCommand": "npm --prefix ../web run build",
"frontendDist": "../../web/dist"
},
"app": {
"windows": [
{
"label": "main",
"title": "colibrì",
"width": 1280,
"height": 820,
"minWidth": 860,
"minHeight": 600,
"center": true,
"resizable": true
}
],
"security": {
"csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: http://asset.localhost; connect-src 'self' ipc: http://ipc.localhost http://127.0.0.1:* http://localhost:*"
}
},
"bundle": {
"active": true,
"targets": "all",
"category": "DeveloperTool",
"shortDescription": "Local interface for the colibri inference engine",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}