Files
Maze Winther 6a22a3ecbd refactor: centralize editor interaction state
Move timeline and preview gestures into dedicated controllers so hooks stay thin around editor state and DOM events.

This also routes drag and playback synchronization through manager APIs and reuses persistent wasm surfaces so scrubbing, seeking, and preview rendering stay in sync.

Made-with: Cursor
2026-04-25 03:56:22 +02:00
..

rust/

Shared Rust crates that power OpenCut across platforms (web via WASM, desktop natively).

Adding a new crate

  1. Create it under rust/crates/
  2. Add bridge as a dependency
  3. Annotate public functions with #[export]

How #[export] works

use bridge::export;

#[export]
pub fn round_to_frame(time: f64, fps: f64) -> f64 {
    (time * fps).round() / fps
}

Without the wasm feature, the macro is a no-op. With --features wasm, it expands to:

#[wasm_bindgen(js_name = "roundToFrame")]
pub fn round_to_frame(time: f64, fps: f64) -> f64 { ... }

Desktop uses the crates directly as Cargo dependencies.

Testing

cargo test -p <crate>