OpenCut/rust
Luis Esteban Acevedo Ladino 1daba0e9ea feat: add 23 new video effects across 5 categories
Implement color (hue rotate, temperature, tint, posterize, duotone, cross process),
distortion (pixelate, chromatic aberration, glitch, wave, mirror, kaleidoscope, fisheye),
light (sharpen, glow, exposure, shadows/highlights), edge (detection, emboss), and
style (film grain, halftone, scanlines, color key) effects as WGSL shaders with Rust
pack functions and TypeScript definitions.
2026-04-27 09:12:06 -05:00
..
crates feat: add 23 new video effects across 5 categories 2026-04-27 09:12:06 -05:00
wasm chore: bump opencut-wasm to 0.2.5 2026-04-13 05:08:29 +02:00
README.md feat: add shared Rust crates for cross-platform time utilities 2026-03-29 15:58:46 +02:00

README.md

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>