Skip to content

Tauri App (Studio Desktop)

Native desktop application shell for HoloScript Studio, built with Tauri 2.0.

Overview

@holoscript/tauri-app wraps the Studio web frontend in a native desktop container with GPU acceleration, native file system access, and offline capabilities. The TypeScript bridge layer (tauri-bridge.ts) already exists in the Studio package — this package provides the Rust backend that the bridge calls via IPC.

Architecture

holoscript
Studio (React/Next.js)
  ├── tauri-bridge.ts         ← Feature detection & IPC invoke
  ├── platform-detect.ts      ← Runtime capability probing
  ├── useShaderPreview.ts     ← wgpu shader preview hook
  └── tauri-shim.d.ts         ← Ambient types for @tauri-apps/api

IPC (invoke)

Tauri Rust Backend
  ├── commands.rs              ← IPC command handlers
  ├── gpu.rs                  ← wgpu adapter detection
  ├── shader.rs               ← Headless shader preview pipeline
  └── state.rs                ← Shared app state (Mutex<ShaderPipeline>)

Installation

bash
# From monorepo root:
pnpm install
cd packages/tauri-app
pnpm tauri dev

Use When

  • You need Studio as a native desktop application.
  • You want GPU-accelerated shader preview via wgpu (not WebGL).
  • You need native file dialogs and direct filesystem access.
  • You want offline mode (WASM compiler bundled in Tauri resources).
  • You need auto-update distribution for desktop users.

Key Capabilities

FeatureIPC CommandDescription
GPU Infoget_gpu_infoNative wgpu adapter detection
App Versionget_app_versionVersion from Cargo.toml
Shader Previewshader_preview_init/frame/update/resize/destroy/benchmarkHeadless wgpu render pipeline
Save Projectsave_projectNative file save to disk
Load Projectload_projectNative file load from disk
List Projectslist_projectsList .holo/.hsplus files in directory

Development

bash
pnpm dev              # Start Tauri dev (launches Studio dev server + native window)
pnpm build            # Production build (MSI/AppImage/DMG)
pnpm build:debug      # Debug build (faster, larger)

Current Status

Scaffold — The Rust backend implements all IPC command signatures with correct types matching the TypeScript interfaces. The wgpu shader preview pipeline is scaffolded (init/destroy lifecycle works; actual rendering TODO). File operations are fully functional.

See Also

Released under the MIT License.