From 32438ce25f69de99d2523b98237f62cfa90890d7 Mon Sep 17 00:00:00 2001 From: cashmere Date: Tue, 28 Jul 2026 20:14:51 +0200 Subject: feat: port domain crates to Rust (session 1 complete) All green: cargo test --workspace (~300 tests, 0 failures). - timeline (45): placement, resize/ripple, split, snap, retime, audio separation, scene helpers - animation (73): bezier solver, channel sampling, keyframe ops, split/clamp/clone, param definitions - commands (9): Command trait, BatchCommand, history, 19 concrete commands, freeze-frame port 1:1 - audio (22): audible collection, range mixing, mastering limiter, rms/peak buckets - text (19): cosmic-text layout/measure/raster, backgrounds, decorations - graphics (52): full CSS gradient parser, tiny-skia raster, 4 shape definitions - effect-defs (16): blur definition, registry, pass resolution - mask-defs (19): all 9 mask renderers via tiny-skia - renderer (6): node model + scene builder port - desktop: GPUI projects screen wired to ProjectStore - scene: factory (web defaults: v32, Main Track, 1920x1080, 30fps) --- apps/desktop/src/main.rs | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'apps/desktop/src/main.rs') diff --git a/apps/desktop/src/main.rs b/apps/desktop/src/main.rs index 0ba70959..0508aa33 100644 --- a/apps/desktop/src/main.rs +++ b/apps/desktop/src/main.rs @@ -1,24 +1,17 @@ -use gpui::{ - div, prelude::*, px, rgb, size, App, Application, Bounds, Context, SharedString, Window, - WindowBounds, WindowOptions, -}; +use std::path::PathBuf; -struct AppWindow { - title: SharedString, -} +use gpui::{App, AppContext, Application, Bounds, WindowBounds, WindowOptions, px, size}; + +mod app; +mod projects_view; +mod theme; -impl Render for AppWindow { - fn render(&mut self, _window: &mut Window, _cx: &mut Context) -> impl IntoElement { - div() - .size_full() - .bg(rgb(0x0f0f0f)) - .flex() - .justify_center() - .items_center() - .text_xl() - .text_color(rgb(0xffffff)) - .child(self.title.clone()) - } +use app::OpenCutApp; + +pub fn projects_root() -> PathBuf { + std::env::home_dir() + .unwrap_or_else(|| PathBuf::from(".")) + .join(".local/share/opencut/projects") } fn main() { @@ -29,11 +22,7 @@ fn main() { window_bounds: Some(WindowBounds::Windowed(bounds)), ..Default::default() }, - |_, cx| { - cx.new(|_| AppWindow { - title: "OpenCut".into(), - }) - }, + |_, cx| cx.new(|cx| OpenCutApp::new(cx)), ) .unwrap(); cx.activate(true); -- cgit v1.3.1