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:
@@ -0,0 +1,35 @@
|
||||
# colibrì desktop
|
||||
|
||||
Tauri v2 shell for the shared React interface in `../web`.
|
||||
|
||||
This directory intentionally contains no second frontend. During development,
|
||||
Tauri starts the Vite server from `web/`; release builds package `web/dist`.
|
||||
|
||||
## Development
|
||||
|
||||
The shared web UI landed in PR #23 and is already part of `main`. From the
|
||||
repository root, install its dependencies and start the desktop shell:
|
||||
|
||||
```sh
|
||||
cd web
|
||||
npm ci
|
||||
cd ../desktop
|
||||
cargo install tauri-cli --version "^2.0.0" --locked
|
||||
cargo tauri dev
|
||||
```
|
||||
|
||||
The application connects to an OpenAI-compatible server configured in the UI.
|
||||
Bundling the inference engine or managing its process is intentionally deferred:
|
||||
the model is hundreds of gigabytes and must remain an external, user-selected
|
||||
resource rather than an opaque application sidecar.
|
||||
|
||||
This first desktop increment only packages the existing UI in a native window.
|
||||
It does not change the web application, start the inference engine, download
|
||||
models, or add native filesystem and process permissions.
|
||||
|
||||
## Validation
|
||||
|
||||
```sh
|
||||
cargo fmt --manifest-path src-tauri/Cargo.toml --check
|
||||
cargo check --manifest-path src-tauri/Cargo.toml
|
||||
```
|
||||
Generated
+4358
File diff suppressed because it is too large
Load Diff
@@ -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 = [] }
|
||||
@@ -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 |
@@ -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");
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
colibri_desktop_lib::run();
|
||||
}
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user