Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

update

Jareercd3cc03c11ab
diff --git a/BUILD.md b/BUILD.md
index 942052f9..02bf80dc 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -27,7 +27,15 @@ there is a guaranteed failure. Stage the pair in `desktop/src-tauri/ffmpeg/`
before `npm run app:build`: on Windows, download the artifact from
`.github/workflows/ffmpeg.yml`; on macOS, build the same cut-down FFmpeg
locally with that workflow's configure line (static x264, system frameworks
-only - verify with `otool -L`).
+only - verify with `otool -L`). A release build **fails** if the pair is not
+staged - `src-tauri/build.rs` checks, because an app once shipped without it
+and every media operation failed at runtime.
+
+Two lessons that trimmed build has already taught, encoded in the code and
+the `export_integration` test: modern FFmpeg resolves a bare `-` to the `fd:`
+protocol, which the trimmed build does not include, so every pipe is spelled
+`pipe:0`/`pipe:1`; and any filter used anywhere in the app must be in the
+build's `--enable-filter` list, which the integration test is there to catch.
```
winget install Gyan.FFmpeg # Windows
@@ -39,7 +47,8 @@ sudo apt install ffmpeg # Debian/Ubuntu
```sh
cd engine
-cargo test --workspace # ~60 tests, none of them need FFmpeg
+cargo test --workspace # pure tests; none need FFmpeg
+cargo test --workspace --features relay-render/gpu # adds the wgpu compositor
cargo clippy --workspace --all-targets
cargo run -p relay-cli -- probe some-video.mp4
cargo run -p relay-cli -- render in.mp4 out.mp4 --frames 120 --fade 30
@@ -49,6 +58,22 @@ The tests are pure — they exercise the timeline model, rational time and the
compositor, and pass on a machine with no FFmpeg at all. The CLI is how you
exercise the parts that do need it.
+The `gpu` feature of `relay-render` builds `WgpuCompositor`, a second
+implementation of the same `Compositor` trait. The desktop app enables it and
+uses it for export when the machine has an adapter, with `CpuCompositor` as
+the always-correct fallback and reference (its tests diff the two). The
+feature is off by default so engine-only work never pays for the wgpu tree.
+
+There is also an end-to-end suite that runs a real export — decoders,
+compositor, encoder, audio graph, mux — against the **bundled** FFmpeg pair
+when it is staged, so a component missing from the trimmed build fails in CI
+rather than in a user's export:
+
+```sh
+cd desktop/src-tauri
+cargo test --test export_integration # needs a system ffmpeg for fixtures
+```
+
## Desktop app
```sh
diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock
index e684ea61..98bbf3f2 100644
--- a/desktop/src-tauri/Cargo.lock
+++ b/desktop/src-tauri/Cargo.lock
@@ -32,6 +32,12 @@ dependencies = [
"alloc-no-stdlib",
]
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
[[package]]
name = "alsa"
version = "0.9.1"
@@ -69,6 +75,21 @@ version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
+[[package]]
+name = "arrayvec"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
+
+[[package]]
+name = "ash"
+version = "0.38.0+1.3.281"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"
+dependencies = [
+ "libloading 0.8.9",
+]
+
[[package]]
name = "async-broadcast"
version = "0.7.2"
@@ -253,7 +274,16 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
dependencies = [
- "bit-vec",
+ "bit-vec 0.8.0",
+]
+
+[[package]]
+name = "bit-set"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d"
+dependencies = [
+ "bit-vec 0.9.1",
]
[[package]]
@@ -262,6 +292,12 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
+[[package]]
+name = "bit-vec"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"
+
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -349,6 +385,20 @@ name = "bytemuck"
version = "1.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797"
+dependencies = [
+ "bytemuck_derive",
+]
+
+[[package]]
+name = "bytemuck_derive"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
[[package]]
name = "byteorder"
@@ -475,6 +525,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+[[package]]
+name = "cfg_aliases"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
+
[[package]]
name = "chrono"
version = "0.4.45"
@@ -487,6 +543,17 @@ dependencies = [
"windows-link 0.2.1",
]
+[[package]]
+name = "codespan-reporting"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"
+dependencies = [
+ "serde",
+ "termcolor",
+ "unicode-width",
+]
+
[[package]]
name = "combine"
version = "4.6.8"
@@ -629,6 +696,12 @@ version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
+[[package]]
+name = "crunchy"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
+
[[package]]
name = "crypto-common"
version = "0.1.7"
@@ -844,6 +917,15 @@ dependencies = [
"syn 3.0.4",
]
+[[package]]
+name = "dlib"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a"
+dependencies = [
+ "libloading 0.7.4",
+]
+
[[package]]
name = "dlopen2"
version = "0.8.2"
@@ -867,13 +949,22 @@ dependencies = [
"syn 2.0.119",
]
+[[package]]
+name = "document-features"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"
+dependencies = [
+ "litrs",
+]
+
[[package]]
name = "dom_query"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89"
dependencies = [
- "bit-set",
+ "bit-set 0.8.0",
"cssparser",
"foldhash",
"html5ever",
@@ -1387,6 +1478,17 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "gl_generator"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
+dependencies = [
+ "khronos_api",
+ "log",
+ "xml-rs",
+]
+
[[package]]
name = "glib"
version = "0.18.5"
@@ -1440,6 +1542,27 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
+[[package]]
+name = "glow"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5"
+dependencies = [
+ "js-sys",
+ "slotmap",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "glutin_wgl_sys"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e"
+dependencies = [
+ "gl_generator",
+]
+
[[package]]
name = "gobject-sys"
version = "0.18.0"
@@ -1451,6 +1574,20 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "gpu-allocator"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795"
+dependencies = [
+ "ash",
+ "hashbrown 0.16.1",
+ "log",
+ "presser",
+ "thiserror 2.0.20",
+ "windows 0.54.0",
+]
+
[[package]]
name = "gtk"
version = "0.18.2"
@@ -1503,6 +1640,18 @@ dependencies = [
"syn 2.0.119",
]
+[[package]]
+name = "half"
+version = "2.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
+dependencies = [
+ "cfg-if",
+ "crunchy",
+ "num-traits",
+ "zerocopy",
+]
+
[[package]]
name = "hashbrown"
version = "0.12.3"
@@ -1515,6 +1664,8 @@ version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
dependencies = [
+ "allocator-api2",
+ "equivalent",
"foldhash",
]
@@ -2029,6 +2180,23 @@ dependencies = [
"unicode-segmentation",
]
+[[package]]
+name = "khronos-egl"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
+dependencies = [
+ "libc",
+ "libloading 0.8.9",
+ "pkg-config",
+]
+
+[[package]]
+name = "khronos_api"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
+
[[package]]
name = "libappindicator"
version = "0.9.0"
@@ -2049,7 +2217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"
dependencies = [
"gtk-sys",
- "libloading",
+ "libloading 0.7.4",
"once_cell",
]
@@ -2078,6 +2246,22 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "libloading"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
+dependencies = [
+ "cfg-if",
+ "windows-link 0.2.1",
+]
+
+[[package]]
+name = "libm"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
+
[[package]]
name = "libredox"
version = "0.1.20"
@@ -2110,6 +2294,12 @@ version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
+[[package]]
+name = "litrs"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
+
[[package]]
name = "lock_api"
version = "0.4.14"
@@ -2217,6 +2407,44 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "naga"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130"
+dependencies = [
+ "arrayvec",
+ "bit-set 0.10.0",
+ "bitflags 2.13.1",
+ "cfg-if",
+ "cfg_aliases",
+ "codespan-reporting",
+ "half",
+ "hashbrown 0.17.1",
+ "indexmap 2.14.0",
+ "libm",
+ "log",
+ "naga-types",
+ "num-traits",
+ "once_cell",
+ "rustc-hash 1.1.0",
+ "spirv",
+ "thiserror 2.0.20",
+ "unicode-ident",
+]
+
+[[package]]
+name = "naga-types"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49"
+dependencies = [
+ "hashbrown 0.17.1",
+ "indexmap 2.14.0",
+ "rustc-hash 1.1.0",
+ "thiserror 2.0.20",
+]
+
[[package]]
name = "ndk"
version = "0.9.0"
@@ -2277,6 +2505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
+ "libm",
]
[[package]]
@@ -2477,6 +2706,18 @@ dependencies = [
"objc2-core-foundation",
]
+[[package]]
+name = "objc2-metal"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
+dependencies = [
+ "bitflags 2.13.1",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
[[package]]
name = "objc2-quartz-core"
version = "0.3.2"
@@ -2486,7 +2727,9 @@ dependencies = [
"bitflags 2.13.1",
"objc2",
"objc2-core-foundation",
+ "objc2-core-graphics",
"objc2-foundation",
+ "objc2-metal",
]
[[package]]
@@ -2557,6 +2800,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+[[package]]
+name = "ordered-float"
+version = "5.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "ordered-stream"
version = "0.2.0"
@@ -2756,6 +3008,12 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "pollster"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"
+
[[package]]
name = "portable-atomic"
version = "1.15.0"
@@ -2792,6 +3050,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+[[package]]
+name = "presser"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
+
[[package]]
name = "proc-macro-crate"
version = "1.3.1"
@@ -2854,6 +3118,12 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "profiling"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5"
+
[[package]]
name = "quick-xml"
version = "0.41.0"
@@ -2884,12 +3154,30 @@ version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
+[[package]]
+name = "range-alloc"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"
+
[[package]]
name = "raw-window-handle"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+[[package]]
+name = "raw-window-metal"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135"
+dependencies = [
+ "objc2",
+ "objc2-core-foundation",
+ "objc2-foundation",
+ "objc2-quartz-core",
+]
+
[[package]]
name = "redox_syscall"
version = "0.5.18"
@@ -2994,9 +3282,17 @@ dependencies = [
name = "relay-render"
version = "0.1.0"
dependencies = [
+ "pollster",
"relay-core",
+ "wgpu",
]
+[[package]]
+name = "renderdoc-sys"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
+
[[package]]
name = "reqwest"
version = "0.13.4"
@@ -3080,6 +3376,12 @@ dependencies = [
"sqlite-wasm-rs",
]
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
[[package]]
name = "rustc-hash"
version = "2.1.3"
@@ -3194,7 +3496,7 @@ dependencies = [
"phf",
"phf_codegen",
"precomputed-hash",
- "rustc-hash",
+ "rustc-hash 2.1.3",
"servo_arc",
"smallvec",
]
@@ -3413,6 +3715,15 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+[[package]]
+name = "slotmap"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038"
+dependencies = [
+ "version_check",
+]
+
[[package]]
name = "smallvec"
version = "1.15.2"
@@ -3477,6 +3788,15 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "spirv"
+version = "0.4.0+sdk-1.4.341.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f"
+dependencies = [
+ "bitflags 2.13.1",
+]
+
[[package]]
name = "sqlite-wasm-rs"
version = "0.5.5"
@@ -3495,6 +3815,12 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
[[package]]
name = "string_cache"
version = "0.9.0"
@@ -3974,6 +4300,15 @@ dependencies = [
"new_debug_unreachable",
]
+[[package]]
+name = "termcolor"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
+dependencies = [
+ "winapi-util",
+]
+
[[package]]
name = "thiserror"
version = "1.0.69"
@@ -4396,6 +4731,12 @@ version = "1.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
+[[package]]
+name = "unicode-width"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+
[[package]]
name = "url"
version = "2.5.8"
@@ -4579,6 +4920,18 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "wayland-sys"
+version = "0.31.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be"
+dependencies = [
+ "dlib",
+ "log",
+ "once_cell",
+ "pkg-config",
+]
+
[[package]]
name = "web-sys"
version = "0.3.104"
@@ -4681,6 +5034,179 @@ dependencies = [
"windows-core 0.61.2",
]
+[[package]]
+name = "wgpu"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e"
+dependencies = [
+ "arrayvec",
+ "bitflags 2.13.1",
+ "bytemuck",
+ "cfg-if",
+ "cfg_aliases",
+ "document-features",
+ "hashbrown 0.17.1",
+ "js-sys",
+ "log",
+ "naga",
+ "parking_lot",
+ "portable-atomic",
+ "profiling",
+ "raw-window-handle",
+ "smallvec",
+ "static_assertions",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "wgpu-core",
+ "wgpu-hal",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-core"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14"
+dependencies = [
+ "arrayvec",
+ "bit-set 0.10.0",
+ "bit-vec 0.9.1",
+ "bitflags 2.13.1",
+ "bytemuck",
+ "cfg_aliases",
+ "document-features",
+ "hashbrown 0.17.1",
+ "indexmap 2.14.0",
+ "log",
+ "naga",
+ "naga-types",
+ "once_cell",
+ "parking_lot",
+ "portable-atomic",
+ "profiling",
+ "raw-window-handle",
+ "rustc-hash 1.1.0",
+ "smallvec",
+ "thiserror 2.0.20",
+ "wgpu-core-deps-apple",
+ "wgpu-core-deps-emscripten",
+ "wgpu-core-deps-windows-linux-android",
+ "wgpu-hal",
+ "wgpu-naga-bridge",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-core-deps-apple"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68"
+dependencies = [
+ "wgpu-hal",
+]
+
+[[package]]
+name = "wgpu-core-deps-emscripten"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86"
+dependencies = [
+ "wgpu-hal",
+]
+
+[[package]]
+name = "wgpu-core-deps-windows-linux-android"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f"
+dependencies = [
+ "wgpu-hal",
+]
+
+[[package]]
+name = "wgpu-hal"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58"
+dependencies = [
+ "android_system_properties",
+ "arrayvec",
+ "ash",
+ "bit-set 0.10.0",
+ "bitflags 2.13.1",
+ "block2",
+ "bytemuck",
+ "cfg-if",
+ "cfg_aliases",
+ "glow",
+ "glutin_wgl_sys",
+ "gpu-allocator",
+ "hashbrown 0.17.1",
+ "js-sys",
+ "khronos-egl",
+ "libc",
+ "libloading 0.8.9",
+ "log",
+ "naga",
+ "naga-types",
+ "ndk-sys",
+ "objc2",
+ "objc2-core-foundation",
+ "objc2-core-graphics",
+ "objc2-foundation",
+ "objc2-metal",
+ "objc2-quartz-core",
+ "once_cell",
+ "ordered-float",
+ "parking_lot",
+ "portable-atomic",
+ "portable-atomic-util",
+ "profiling",
+ "range-alloc",
+ "raw-window-handle",
+ "raw-window-metal",
+ "renderdoc-sys",
+ "smallvec",
+ "static_assertions",
+ "thiserror 2.0.20",
+ "wasm-bindgen",
+ "wayland-sys",
+ "web-sys",
+ "wgpu-naga-bridge",
+ "wgpu-types",
+ "windows 0.62.2",
+ "windows-core 0.62.2",
+ "windows-result 0.4.1",
+]
+
+[[package]]
+name = "wgpu-naga-bridge"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081"
+dependencies = [
+ "naga",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-types"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286"
+dependencies = [
+ "bitflags 2.13.1",
+ "bytemuck",
+ "js-sys",
+ "log",
+ "naga-types",
+ "raw-window-handle",
+ "static_assertions",
+ "web-sys",
+]
+
[[package]]
name = "winapi"
version = "0.3.9"
@@ -4743,11 +5269,23 @@ version = "0.61.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
dependencies = [
- "windows-collections",
+ "windows-collections 0.2.0",
"windows-core 0.61.2",
- "windows-future",
+ "windows-future 0.2.1",
"windows-link 0.1.3",
- "windows-numerics",
+ "windows-numerics 0.2.0",
+]
+
+[[package]]
+name = "windows"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
+dependencies = [
+ "windows-collections 0.3.2",
+ "windows-core 0.62.2",
+ "windows-future 0.3.2",
+ "windows-numerics 0.3.1",
]
[[package]]
@@ -4759,6 +5297,15 @@ dependencies = [
"windows-core 0.61.2",
]
+[[package]]
+name = "windows-collections"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
+dependencies = [
+ "windows-core 0.62.2",
+]
+
[[package]]
name = "windows-core"
version = "0.54.0"
@@ -4803,7 +5350,18 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
dependencies = [
"windows-core 0.61.2",
"windows-link 0.1.3",
- "windows-threading",
+ "windows-threading 0.1.0",
+]
+
+[[package]]
+name = "windows-future"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
+dependencies = [
+ "windows-core 0.62.2",
+ "windows-link 0.2.1",
+ "windows-threading 0.2.1",
]
[[package]]
@@ -4850,6 +5408,16 @@ dependencies = [
"windows-link 0.1.3",
]
+[[package]]
+name = "windows-numerics"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
+dependencies = [
+ "windows-core 0.62.2",
+ "windows-link 0.2.1",
+]
+
[[package]]
name = "windows-result"
version = "0.1.2"
@@ -4988,6 +5556,15 @@ dependencies = [
"windows-link 0.1.3",
]
+[[package]]
+name = "windows-threading"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
+dependencies = [
+ "windows-link 0.2.1",
+]
+
[[package]]
name = "windows-version"
version = "0.1.7"
@@ -5246,6 +5823,12 @@ dependencies = [
"pkg-config",
]
+[[package]]
+name = "xml-rs"
+version = "0.8.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7"
+
[[package]]
name = "yoke"
version = "0.8.3"
@@ -5339,6 +5922,26 @@ dependencies = [
"serde",
]
+[[package]]
+name = "zerocopy"
+version = "0.8.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
[[package]]
name = "zerofrom"
version = "0.1.8"
diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml
index 0a0b9867..d0d04b8f 100644
--- a/desktop/src-tauri/Cargo.toml
+++ b/desktop/src-tauri/Cargo.toml
@@ -25,7 +25,7 @@ serde_json = "1"
# depend on there being a desktop app.
relay-core = { path = "../../engine/crates/relay-core" }
relay-media = { path = "../../engine/crates/relay-media" }
-relay-render = { path = "../../engine/crates/relay-render" }
+relay-render = { path = "../../engine/crates/relay-render", features = ["gpu"] }
rusqlite = { version = "0.40.2", features = ["bundled"] }
# Engine-owned audio playback: cpal talks to the output device, memmap2 keeps
diff --git a/desktop/src-tauri/build.rs b/desktop/src-tauri/build.rs
index d860e1e6..5967c2c6 100644
--- a/desktop/src-tauri/build.rs
+++ b/desktop/src-tauri/build.rs
@@ -1,3 +1,23 @@
fn main() {
+ // A release build is a packaged build, and a packaged app that shipped
+ // without its FFmpeg pair has happened once already: everything media-
+ // shaped failed at runtime, launched from Finder with no PATH to fall
+ // back on. Fail the build instead - staging the binaries is part of
+ // building for release (see BUILD.md).
+ if std::env::var("PROFILE").as_deref() == Ok("release") {
+ let suffix = if cfg!(target_os = "windows") { ".exe" } else { "" };
+ let staged = std::path::Path::new("ffmpeg");
+ for binary in ["ffmpeg", "ffprobe"] {
+ let path = staged.join(format!("{binary}{suffix}"));
+ assert!(
+ path.is_file(),
+ "release build without a bundled {binary}: stage the FFmpeg pair in \
+ desktop/src-tauri/ffmpeg/ first (see BUILD.md), or the packaged app \
+ will ship broken"
+ );
+ }
+ println!("cargo:rerun-if-changed=ffmpeg");
+ }
+
tauri_build::build()
}
diff --git a/desktop/src-tauri/src/export.rs b/desktop/src-tauri/src/export.rs
index 3951d9ce..8ceba907 100644
--- a/desktop/src-tauri/src/export.rs
+++ b/desktop/src-tauri/src/export.rs
@@ -1,27 +1,28 @@
//! Rendering a timeline to a file.
//!
-//! This is the first thing in the app that uses the engine for what it is for:
-//! `relay-render` decides what is on screen at each instant, `relay-media`
-//! decodes and encodes, and `relay-core` holds the timeline. The UI's own
-//! model is converted into the engine's on the way in, which is a useful
-//! rehearsal for the day the engine owns the model outright.
+//! This is the seam where the UI's model becomes the engine's: clips arrive as
+//! flat JSON, are converted into a `relay_core::Timeline`, and from there the
+//! engine decides everything - what is on screen (`relay-render`), what the
+//! sound means (`relay_media::audio`), and how bytes move (`relay-media`).
+//! Editing semantics deliberately do not live here; this file converts,
+//! orchestrates and reports.
//!
-//! Picture and sound take different routes. Picture is composited frame by
-//! frame here, because that is the part that needs a compositor. Sound is
-//! handed to FFmpeg as one `filter_complex`, because mixing delayed, trimmed
-//! audio streams is exactly what it is good at and writing a mixer to do it
-//! twice would be silly.
+//! Picture is composited frame by frame - on the GPU when the machine has one,
+//! with the CPU compositor as the always-correct fallback. Sound is planned by
+//! the engine as one FFmpeg filtergraph and mixed in a single pass.
use std::collections::HashMap;
use std::path::{Path, PathBuf};
+use std::sync::atomic::{AtomicBool, Ordering};
use relay_core::frame::Frame;
use relay_core::time::{FrameRate, Rational};
use relay_core::timeline::{Clip, ClipId, MediaRef, Timeline, Track, TrackKind, Transform};
+use relay_media::audio::{self, AudioClip};
use relay_media::{
DecodeOptions, EncodeOptions, FfmpegDecoder, FfmpegEncoder, FrameSink, FrameSource,
};
-use relay_render::{Compositor, CpuCompositor, Layer, Placement, plan_frame};
+use relay_render::{Compositor, CpuCompositor, Layer, Placement, WgpuCompositor, plan_frame};
use serde::{Deserialize, Serialize};
use tauri::Emitter;
@@ -109,8 +110,44 @@ struct Progress {
stage: &'static str,
}
+/// What the export loop calls to report and to ask "should I stop?".
+pub struct Reporter<'a> {
+ /// Called with (frame, total, stage).
+ pub progress: &'a mut dyn FnMut(i64, i64, &'static str),
+ /// Checked between frames and stages; true aborts cleanly.
+ pub cancel: &'a AtomicBool,
+}
+
+impl Reporter<'_> {
+ fn emit(&mut self, frame: i64, total: i64, stage: &'static str) {
+ (self.progress)(frame, total, stage);
+ }
+
+ fn cancelled(&self) -> Result<(), String> {
+ if self.cancel.load(Ordering::Relaxed) {
+ Err("export cancelled".to_owned())
+ } else {
+ Ok(())
+ }
+ }
+}
+
+/// Renders `request` and returns the path written. Tauri-facing wrapper that
+/// reports through the `export://progress` event; the logic is in [`render`].
+pub fn run(
+ app: &tauri::AppHandle,
+ request: ExportRequest,
+ cancel: &AtomicBool,
+) -> Result<String, String> {
+ let mut progress = |frame: i64, total: i64, stage: &'static str| {
+ // A dropped progress event is not worth failing an export over.
+ let _ = app.emit("export://progress", Progress { frame, total, stage });
+ };
+ render(&request, Reporter { progress: &mut progress, cancel })
+}
+
/// Renders `request` and returns the path written.
-pub fn run(app: &tauri::AppHandle, request: ExportRequest) -> Result<String, String> {
+pub fn render(request: &ExportRequest, mut reporter: Reporter<'_>) -> Result<String, String> {
if request.clips.is_empty() {
return Err("there is nothing on the timeline to export".to_owned());
}
@@ -141,12 +178,23 @@ pub fn run(app: &tauri::AppHandle, request: ExportRequest) -> Result<String, Str
.filter(|clip| clip.kind == "video" && !clip.muted),
);
- let duration = request
+ // An unmuted clip can still have no audio stream - a screen recording, a
+ // silent render. FFmpeg refuses a filtergraph that names `[N:a]` on such
+ // an input rather than treating it as silence, so membership in the mix
+ // is decided by probing the file, not by the clip's kind.
+ let mut has_audio: HashMap<&str, bool> = HashMap::new();
+ sound.retain(|clip| {
+ *has_audio.entry(clip.path.as_str()).or_insert_with(|| {
+ relay_media::probe(&clip.path).is_ok_and(|info| info.audio.is_some())
+ })
+ });
+
+ let timeline_end = request
.clips
.iter()
.map(|clip| clip.start + clip.duration)
.fold(0.0f64, f64::max);
- let total_frames = (duration * rate.fps().as_f64()).round() as i64;
+ let total_frames = (timeline_end * rate.fps().as_f64()).round() as i64;
if total_frames <= 0 {
return Err("the timeline is empty".to_owned());
}
@@ -159,7 +207,7 @@ pub fn run(app: &tauri::AppHandle, request: ExportRequest) -> Result<String, Str
let mixed = directory.join(format!(".{stem}.relay-audio.m4a"));
let result = (|| -> Result<(), String> {
- render_picture(app, &request, rate, total_frames, &visible, &silent)?;
+ render_picture(request, rate, total_frames, &visible, &silent, &mut reporter)?;
if sound.is_empty() {
std::fs::rename(&silent, &output)
@@ -167,11 +215,14 @@ pub fn run(app: &tauri::AppHandle, request: ExportRequest) -> Result<String, Str
return Ok(());
}
- emit(app, 0, total_frames, "mixing audio");
- mix_audio(&sound, duration, &mixed)?;
+ reporter.cancelled()?;
+ reporter.emit(0, total_frames, "mixing audio");
+ let mix: Vec<AudioClip> = sound.iter().map(|clip| audio_clip(clip)).collect();
+ audio::mix_to_file(&mix, timeline_end, &mixed).map_err(|error| error.to_string())?;
- emit(app, total_frames, total_frames, "muxing");
- mux(&silent, &mixed, &output)
+ reporter.cancelled()?;
+ reporter.emit(total_frames, total_frames, "muxing");
+ audio::mux(&silent, &mixed, &output).map_err(|error| error.to_string())
})();
let _ = std::fs::remove_file(&silent);
@@ -180,14 +231,40 @@ pub fn run(app: &tauri::AppHandle, request: ExportRequest) -> Result<String, Str
result.map(|()| output.to_string_lossy().into_owned())
}
+/// The engine's view of one audible clip.
+fn audio_clip(clip: &ExportClip) -> AudioClip {
+ AudioClip {
+ path: PathBuf::from(&clip.path),
+ start: clip.start,
+ duration: clip.duration,
+ source_start: clip.source_start,
+ speed: audio::clamp_speed(clip.speed),
+ preserve_pitch: clip.preserve_pitch,
+ volume: clip.volume,
+ fade_in: clip.fade_in,
+ fade_out: clip.fade_out,
+ filter_chain: clip.filter_chain.clone(),
+ }
+}
+
+/// The best compositor this machine offers: the GPU when it has one, the CPU
+/// reference otherwise. Never an error - a machine with no adapter renders
+/// slower, not not-at-all.
+fn best_compositor() -> Box<dyn Compositor> {
+ match WgpuCompositor::new() {
+ Some(gpu) => Box::new(gpu),
+ None => Box::new(CpuCompositor),
+ }
+}
+
/// Composites every frame of the timeline into a soundless video file.
fn render_picture(
- app: &tauri::AppHandle,
request: &ExportRequest,
rate: FrameRate,
total_frames: i64,
visible: &[&ExportClip],
destination: &Path,
+ reporter: &mut Reporter<'_>,
) -> Result<(), String> {
let (timeline, stills, decode_sizes) = build_timeline(request, rate, visible);
@@ -204,15 +281,18 @@ fn render_picture(
)
.map_err(|error| error.to_string())?;
- let mut compositor = CpuCompositor;
+ let mut compositor = best_compositor();
// One decoder per clip, opened at its in-point the first time the clip is
- // needed and dropped the moment it leaves the playhead. Because every
- // decoder is opened at the output frame rate, pulling exactly one frame
- // per output frame keeps each of them in step without any seeking.
+ // needed and dropped the moment it leaves the playhead. Every decoder is
+ // opened at `output rate / clip speed`, so pulling exactly one frame per
+ // output frame keeps each of them in step with the plan's source times
+ // without any seeking - including retimed clips.
let mut decoders: HashMap<ClipId, FfmpegDecoder> = HashMap::new();
for index in 0..total_frames {
+ reporter.cancelled()?;
+
let time = rate.time_of_frame(index);
let plan = plan_frame(&timeline, time);
@@ -228,10 +308,22 @@ fn render_picture(
.get(&layer.clip)
.copied()
.unwrap_or((request.width, request.height));
+
+ // A retimed clip advances the source by `speed / fps`
+ // seconds per output frame, so the decoder must emit
+ // frames exactly that far apart: a rate of `fps / speed`.
+ // (At 2x, 300 output frames cover 20s of source - the
+ // decoder emits 15 frames per source second, not 60.)
+ let decode_rate = if layer.speed == Rational::ONE {
+ rate
+ } else {
+ FrameRate::new(rate.fps() / layer.speed)
+ };
+
let mut options = DecodeOptions::default()
.starting_at(layer.source_time)
.scaled_to(decode_width, decode_height)
- .at_rate(rate);
+ .at_rate(decode_rate);
// A still is a one-frame stream. Without looping it would
// contribute a single frame and then disappear.
@@ -288,7 +380,7 @@ fn render_picture(
decoders.retain(|clip, _| live.contains(clip));
if index % 15 == 0 {
- emit(app, index, total_frames, "rendering");
+ reporter.emit(index, total_frames, "rendering");
}
}
@@ -329,6 +421,12 @@ fn build_timeline(
let mut engine_clip = Clip::new(MediaRef::new(&clip.path), start, duration);
engine_clip.source_start = quantise(clip.source_start, rate);
+ // The same clamp the audio path applies, so a 2x clip means the same
+ // thing to picture and sound. A still has no meaningful rate.
+ if clip.kind != "image" {
+ engine_clip.speed = Rational::approximate(audio::clamp_speed(clip.speed))
+ .unwrap_or(Rational::ONE);
+ }
engine_clip.transform = Transform {
scale: clip.scale,
offset_x: clip.offset_x,
@@ -367,198 +465,3 @@ fn fitted_size(request: &ExportRequest, clip: &ExportClip) -> Option<(u32, u32)>
fn quantise(seconds: f64, rate: FrameRate) -> Rational {
rate.time_of_frame((seconds * rate.fps().as_f64()).round().max(0.0) as i64)
}
-
-/// Trims, delays and mixes every audible clip into one track.
-fn mix_audio(clips: &[&ExportClip], duration: f64, destination: &Path) -> Result<(), String> {
- let mut command = std::process::Command::new(relay_media::ffmpeg());
- command.args(["-hide_banner", "-nostdin", "-loglevel", "error", "-y"]);
-
- for clip in clips {
- command.args(["-i", &clip.path]);
- }
-
- // Each input is trimmed to its in-point, restamped from zero, then delayed
- // to where it sits on the timeline. `all=1` applies the delay to every
- // channel; without it only the left channel moves, which is a memorable
- // way to discover the flag exists.
- let mut chains: Vec<String> = Vec::new();
- for (index, clip) in clips.iter().enumerate() {
- let delay_ms = (clip.start * 1000.0).round().max(0.0) as i64;
-
- // Gain and fades sit between the restamp and the delay: after the
- // restamp so the fade times are measured from the clip's own start,
- // and before the delay so they are not pushed along with it.
- // A sped-up clip covers more source than its timeline length, so the
- // trim has to take `duration * speed` before the rate is applied.
- let speed = clip.speed.clamp(0.1, 8.0);
- let mut stage = format!(
- "[{index}:a]atrim=start={:.6}:duration={:.6},asetpts=PTS-STARTPTS",
- clip.source_start,
- clip.duration * speed
- );
-
- if (speed - 1.0).abs() > f64::EPSILON {
- if clip.preserve_pitch {
- // atempo time-stretches, leaving pitch alone. Its per-instance
- // range is limited, so a large change is split into stages
- // that multiply out to the requested rate.
- for factor in tempo_stages(speed) {
- stage.push_str(&format!(",atempo={factor:.6}"));
- }
- } else {
- // Resampling moves pitch and tempo together - the tape effect.
- stage.push_str(&format!(
- ",asetrate=48000*{speed:.6},aresample=48000"
- ));
- }
- }
-
- // Filters first: they are what the clip *is* now, and gain and fades
- // are adjustments applied to that result. Reversing the order would
- // let a compressor inside a filter chain undo the fade.
- if !clip.filter_chain.is_empty() {
- stage.push(',');
- stage.push_str(&clip.filter_chain);
- }
-
- if (clip.volume - 1.0).abs() > f64::EPSILON {
- stage.push_str(&format!(",volume={:.4}", clip.volume.max(0.0)));
- }
- if clip.fade_in > 0.0 {
- stage.push_str(&format!(",afade=t=in:st=0:d={:.4}", clip.fade_in));
- }
- if clip.fade_out > 0.0 {
- let start = (clip.duration - clip.fade_out).max(0.0);
- stage.push_str(&format!(",afade=t=out:st={start:.4}:d={:.4}", clip.fade_out));
- }
-
- stage.push_str(&format!(",adelay={delay_ms}:all=1[a{index}]"));
- chains.push(stage);
- }
-
- let inputs: String = (0..clips.len()).map(|index| format!("[a{index}]")).collect();
- let mix = if clips.len() == 1 {
- // amix with one input would still apply its normalisation curve.
- format!("{inputs}anull[mixed]")
- } else {
- format!("{inputs}amix=inputs={}:normalize=0[mixed]", clips.len())
- };
-
- // The `aresample` is load-bearing, and not about sample rates.
- //
- // `atempo` emits a fractional number of samples per frame, and the leftover
- // rides along in the timestamps it produces. Mixing such a branch with an
- // untouched one gave `amix` an output whose timestamps eventually came out
- // as AV_NOPTS_VALUE, and the muxer rejected the packet:
- //
- // non monotonically increasing dts to muxer: 9223372036854775807
- //
- // The effect was a two-second mix written as a ~40 ms file - so any export
- // of more than one clip, where any clip had a speed other than 1 with
- // "preserve pitch" on, produced a silently truncated soundtrack. The
- // exporter reported success either way, which is how it went unnoticed.
- //
- // Passing the mix through the resampler regenerates one continuous
- // timestamp series from the sample count and absorbs the drift. Verified
- // against every shape this function emits: both speed directions, the
- // multi-stage `atempo` used beyond 2x, the `asetrate` path, several clips
- // at once, and the single-clip `anull` path.
- //
- // Do not "simplify" this away because the rate on both sides is 48000.
- chains.push(format!(
- "{mix};[mixed]aresample=48000,apad,atrim=duration={duration:.6}[out]"
- ));
-
- command
- .args(["-filter_complex", &chains.join(";")])
- .args(["-map", "[out]"])
- .args(["-c:a", "aac", "-b:a", "192k"])
- .arg(destination);
-
- run_ffmpeg(command, "mixing audio")
-}
-
-/// Splits a rate into `atempo` stages that each stay inside its valid range.
-///
-/// One filter instance is limited, so 4x has to become 2x then 2x. Multiplying
-/// the stages back together is what keeps the result exact.
-fn tempo_stages(speed: f64) -> Vec<f64> {
- let mut stages = Vec::new();
- let mut remaining = speed;
-
- while remaining > 2.0 {
- stages.push(2.0);
- remaining /= 2.0;
- }
- while remaining < 0.5 {
- stages.push(0.5);
- remaining /= 0.5;
- }
-
- stages.push(remaining);
- stages
-}
-
-fn mux(video: &Path, audio: &Path, output: &Path) -> Result<(), String> {
- let mut command = std::process::Command::new(relay_media::ffmpeg());
- command
- .args(["-hide_banner", "-nostdin", "-loglevel", "error", "-y"])
- .arg("-i")
- .arg(video)
- .arg("-i")
- .arg(audio)
- // The picture is already encoded exactly as asked; re-encoding it here
- // would cost a second full pass and a generation of quality.
- .args(["-c:v", "copy", "-c:a", "copy", "-shortest"])
- .args(["-movflags", "+faststart"])
- .arg(output);
-
- run_ffmpeg(command, "muxing")
-}
-
-fn run_ffmpeg(mut command: std::process::Command, stage: &str) -> Result<(), String> {
- let output = command
- .output()
- .map_err(|error| format!("could not run ffmpeg while {stage}: {error}"))?;
-
- if output.status.success() {
- return Ok(());
- }
-
- let detail = String::from_utf8_lossy(&output.stderr);
- let tail = detail.lines().rev().take(3).collect::<Vec<_>>().join(" / ");
- Err(format!("ffmpeg failed while {stage}: {tail}"))
-}
-
-fn emit(app: &tauri::AppHandle, frame: i64, total: i64, stage: &'static str) {
- // A dropped progress event is not worth failing an export over.
- let _ = app.emit("export://progress", Progress { frame, total, stage });
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn tempo_stages_multiply_back_to_the_requested_rate() {
- for speed in [0.25, 0.5, 0.9, 1.0, 1.5, 2.0, 3.0, 4.0, 8.0] {
- let product: f64 = tempo_stages(speed).iter().product();
- assert!(
- (product - speed).abs() < 1e-9,
- "stages for {speed} multiplied to {product}",
- );
- }
- }
-
- #[test]
- fn every_stage_is_within_the_filter_range() {
- for speed in [0.25, 0.5, 1.0, 4.0, 8.0] {
- for factor in tempo_stages(speed) {
- assert!(
- (0.5..=2.0).contains(&factor),
- "{factor} is outside atempo's range, from speed {speed}",
- );
- }
- }
- }
-}
diff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rs
index f435b4ea..fb08e347 100644
--- a/desktop/src-tauri/src/lib.rs
+++ b/desktop/src-tauri/src/lib.rs
@@ -6,7 +6,8 @@
//! making decisions about the edit, that logic belongs in `relay-core` or
//! `relay-render` where it can be unit-tested without a window.
-mod export;
+// Public so the integration tests can drive a real export; see tests/.
+pub mod export;
mod playback;
mod projects;
@@ -228,7 +229,7 @@ fn filmstrip(path: &str, count: u32, height: u32) -> Result<Vec<u8>, String> {
f64::from(count) / duration
),
])
- .args(["-frames:v", "1", "-q:v", "3", "-f", "mjpeg", "-"])
+ .args(["-frames:v", "1", "-q:v", "3", "-f", "mjpeg", "pipe:1"])
.output()
.map_err(|error| format!("could not run ffmpeg: {error}"))?;
@@ -346,6 +347,9 @@ fn config_dir(app: &tauri::AppHandle) -> Result<std::path::PathBuf, String> {
.map_err(|error| format!("could not locate the config directory: {error}"))
}
+/// The stop flag for the one export that can run at a time.
+struct ExportState(std::sync::Arc<std::sync::atomic::AtomicBool>);
+
/// Renders the timeline to a file.
///
/// Runs on a blocking thread and reports progress through the
@@ -354,13 +358,22 @@ fn config_dir(app: &tauri::AppHandle) -> Result<std::path::PathBuf, String> {
#[tauri::command]
async fn export_project(
app: tauri::AppHandle,
+ state: tauri::State<'_, ExportState>,
request: export::ExportRequest,
) -> Result<String, String> {
- tauri::async_runtime::spawn_blocking(move || export::run(&app, request))
+ let cancel = std::sync::Arc::clone(&state.0);
+ cancel.store(false, std::sync::atomic::Ordering::Relaxed);
+ tauri::async_runtime::spawn_blocking(move || export::run(&app, request, &cancel))
.await
.map_err(|error| format!("export task failed: {error}"))?
}
+/// Asks the running export to stop at the next frame. Idle is a harmless no-op.
+#[tauri::command]
+fn cancel_export(state: tauri::State<'_, ExportState>) {
+ state.0.store(true, std::sync::atomic::Ordering::Relaxed);
+}
+
/// Flattens an error and its causes into one line.
///
/// `Display` on a `thiserror` enum prints only the outermost message, and the
@@ -428,6 +441,9 @@ pub fn run() {
use tauri::Manager;
use_bundled_ffmpeg(app);
app.manage(playback::Playback::start(app.handle().clone()));
+ app.manage(ExportState(std::sync::Arc::new(
+ std::sync::atomic::AtomicBool::new(false),
+ )));
Ok(())
})
.plugin(tauri_plugin_opener::init())
@@ -449,7 +465,8 @@ pub fn run() {
load_project,
recent_projects,
forget_project,
- export_project
+ export_project,
+ cancel_export
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
diff --git a/desktop/src-tauri/src/playback.rs b/desktop/src-tauri/src/playback.rs
index 2ce8fd9d..3db783ca 100644
--- a/desktop/src-tauri/src/playback.rs
+++ b/desktop/src-tauri/src/playback.rs
@@ -26,7 +26,6 @@
//! clip set is re-sent to the callback as each one lands.
use std::collections::{HashMap, HashSet};
-use std::hash::{Hash, Hasher};
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
use std::sync::{mpsc, Arc, Mutex};
@@ -255,15 +254,26 @@ impl Playback {
/// Identity of one decoded span: everything that changes the samples.
/// Volume, fades and timeline position are deliberately absent - they apply
/// at mix time.
+///
+/// FNV-1a rather than the standard library's hasher, because these keys name
+/// files that outlive the process: `DefaultHasher` is free to change between
+/// Rust releases, and a changed hash would silently orphan every project's
+/// audio cache on a toolchain upgrade.
fn decode_key(spec: &ClipSpec) -> String {
- let mut hasher = std::collections::hash_map::DefaultHasher::new();
- spec.path.hash(&mut hasher);
- spec.source_start.to_bits().hash(&mut hasher);
- spec.duration.to_bits().hash(&mut hasher);
- spec.speed.to_bits().hash(&mut hasher);
- spec.preserve_pitch.hash(&mut hasher);
- spec.chain.hash(&mut hasher);
- format!("{:016x}", hasher.finish())
+ let mut hash: u64 = 0xcbf2_9ce4_8422_2325;
+ let mut eat = |bytes: &[u8]| {
+ for &byte in bytes {
+ hash ^= u64::from(byte);
+ hash = hash.wrapping_mul(0x0000_0100_0000_01b3);
+ }
+ };
+ eat(spec.path.as_bytes());
+ eat(&spec.source_start.to_bits().to_le_bytes());
+ eat(&spec.duration.to_bits().to_le_bytes());
+ eat(&spec.speed.to_bits().to_le_bytes());
+ eat(&[u8::from(spec.preserve_pitch)]);
+ eat(spec.chain.as_bytes());
+ format!("{hash:016x}")
}
/// Decodes one clip span to the cache and maps it.
@@ -272,9 +282,7 @@ fn decode_key(spec: &ClipSpec) -> String {
/// speed, so what the preview mixes is what the export renders. A file
/// already in the cache is reused as is - that is the point of the cache.
fn decode(spec: &ClipSpec, project: &Path, key: &str) -> Result<Pcm, String> {
- if spec.chain.contains('\n') || spec.chain.contains('\r') {
- return Err("filter chain contains a line break".to_owned());
- }
+ relay_media::audio::validate_chain(&spec.chain).map_err(|error| error.to_string())?;
let directory = project.join("cache").join("audio");
let destination = directory.join(format!("{key}.pcm"));
@@ -284,39 +292,21 @@ fn decode(spec: &ClipSpec, project: &Path, key: &str) -> Result<Pcm, String> {
std::fs::create_dir_all(&directory)
.map_err(|error| format!("could not create {}: {error}", directory.display()))?;
- let mut filters: Vec<String> = Vec::new();
+ // Speed first, then the clip's own filters - the same order the export
+ // graph applies, because these are one definition, not two. The engine
+ // owns what speed *means*; this function only decodes.
+ let mut filters: Vec<String> =
+ relay_media::audio::speed_filters(spec.speed, spec.preserve_pitch);
if !spec.chain.is_empty() {
filters.push(spec.chain.clone());
}
- if (spec.speed - 1.0).abs() > 1e-9 {
- if spec.preserve_pitch {
- // atempo only accepts [0.5, 2]; factors outside compose.
- let mut factor = spec.speed.clamp(0.0625, 16.0);
- while factor > 2.0 {
- filters.push("atempo=2.0".to_owned());
- factor /= 2.0;
- }
- while factor < 0.5 {
- filters.push("atempo=0.5".to_owned());
- factor /= 0.5;
- }
- filters.push(format!("atempo={factor:.6}"));
- } else {
- // Tape behaviour: resample to the common rate, shift it, and land
- // back on the common rate. Pitch rides the speed.
- filters.push(format!(
- "aresample={PCM_RATE},asetrate={:.0},aresample={PCM_RATE}",
- f64::from(PCM_RATE) * spec.speed
- ));
- }
- }
filters.push(format!("aresample={PCM_RATE}"));
filters.push("aformat=sample_fmts=s16:channel_layouts=stereo".to_owned());
// A sped-up clip reads further into the file than it occupies on the
// timeline: the source window is `duration * speed`, exactly the window
// the exporter trims.
- let window = spec.duration * spec.speed.clamp(0.0625, 16.0);
+ let window = spec.duration * relay_media::audio::clamp_speed(spec.speed);
let temporary = directory.join(format!("{key}.pcm.decoding"));
let file = std::fs::File::create(&temporary)
@@ -328,7 +318,7 @@ fn decode(spec: &ClipSpec, project: &Path, key: &str) -> Result<Pcm, String> {
.args(["-t", &format!("{window:.6}")])
.args(["-i", &spec.path])
.args(["-vn", "-af", &filters.join(",")])
- .args(["-f", "s16le", "-"])
+ .args(["-f", "s16le", "pipe:1"])
.stdout(file)
.status()
.map_err(|error| format!("could not run ffmpeg: {error}"))?;
diff --git a/desktop/src-tauri/tests/export_integration.rs b/desktop/src-tauri/tests/export_integration.rs
new file mode 100644
index 00000000..17b2ea41
--- /dev/null
+++ b/desktop/src-tauri/tests/export_integration.rs
@@ -0,0 +1,197 @@
+//! The export pipeline, end to end, against the FFmpeg the app actually ships.
+//!
+//! The engine's unit tests are pure on purpose; this suite is the opposite. It
+//! generates real fixtures, runs `export::render` - decoders, compositor,
+//! encoder, audio graph, mux - and probes what came out. It exists because the
+//! bugs that reach users live exactly here: a protocol missing from the
+//! trimmed FFmpeg build, a filtergraph naming a stream that does not exist.
+//!
+//! Fixtures are generated with the *system* FFmpeg (the trimmed one has no
+//! lavfi), and the export itself runs against the *bundled* pair when it is
+//! staged in `ffmpeg/` - so a component missing from the shipped build fails
+//! this test instead of a user's export. No system FFmpeg? The suite skips.
+
+use std::path::{Path, PathBuf};
+use std::process::Command;
+use std::sync::atomic::AtomicBool;
+
+use relay_desktop_lib::export::{ExportClip, ExportRequest, Reporter, render};
+
+/// Points the engine at the staged bundle exactly once, before anything runs.
+fn use_bundled_pair() {
+ let staged = Path::new(env!("CARGO_MANIFEST_DIR")).join("ffmpeg");
+ let suffix = if cfg!(windows) { ".exe" } else { "" };
+ let ffmpeg = staged.join(format!("ffmpeg{suffix}"));
+ let ffprobe = staged.join(format!("ffprobe{suffix}"));
+ if ffmpeg.is_file() && ffprobe.is_file() {
+ relay_media::set_binaries(ffmpeg, ffprobe);
+ }
+}
+
+/// True when a system FFmpeg exists to generate fixtures with.
+fn system_ffmpeg() -> bool {
+ Command::new("ffmpeg")
+ .arg("-version")
+ .output()
+ .is_ok_and(|output| output.status.success())
+}
+
+/// Writes a fixture with the system FFmpeg. `lavfi` is unavailable in the
+/// bundled build, which is exactly why fixtures do not go through it.
+fn fixture(directory: &Path, name: &str, args: &[&str]) -> PathBuf {
+ let path = directory.join(name);
+ let status = Command::new("ffmpeg")
+ .args(["-hide_banner", "-loglevel", "error", "-y"])
+ .args(args)
+ .arg(&path)
+ .status()
+ .expect("system ffmpeg runs");
+ assert!(status.success(), "could not generate fixture {name}");
+ path
+}
+
+fn media_clip(path: &Path, kind: &str, start: f64, duration: f64, track: usize) -> ExportClip {
+ ExportClip {
+ path: path.to_string_lossy().into_owned(),
+ kind: kind.to_owned(),
+ start,
+ duration,
+ source_start: 0.0,
+ track,
+ hidden: false,
+ muted: false,
+ volume: 1.0,
+ fade_in: 0.0,
+ fade_out: 0.0,
+ filter_chain: String::new(),
+ speed: 1.0,
+ preserve_pitch: true,
+ scale: 1.0,
+ offset_x: 0.0,
+ offset_y: 0.0,
+ rotation: 0.0,
+ media_width: Some(320),
+ media_height: Some(180),
+ }
+}
+
+fn request(output: &Path, clips: Vec<ExportClip>) -> ExportRequest {
+ ExportRequest {
+ output: output.to_string_lossy().into_owned(),
+ width: 320,
+ height: 180,
+ rate_num: 30,
+ rate_den: 1,
+ crf: 30,
+ preset: "ultrafast".to_owned(),
+ clips,
+ }
+}
+
+fn export(request: &ExportRequest) -> Result<String, String> {
+ let cancel = AtomicBool::new(false);
+ let mut progress = |_: i64, _: i64, _: &'static str| {};
+ render(request, Reporter { progress: &mut progress, cancel: &cancel })
+}
+
+/// One suite rather than many `#[test]`s: fixtures are cheap but not free,
+/// and `set_binaries` is process-global either way.
+#[test]
+fn exports_survive_the_shapes_that_have_actually_broken() {
+ if !system_ffmpeg() {
+ eprintln!("no system ffmpeg; skipping the export integration suite");
+ return;
+ }
+ use_bundled_pair();
+
+ let directory = PathBuf::from(env!("CARGO_TARGET_TMPDIR")).join("export-integration");
+ std::fs::create_dir_all(&directory).expect("tmp dir");
+
+ let with_sound = fixture(
+ &directory,
+ "with-sound.mp4",
+ &[
+ "-f", "lavfi", "-i", "testsrc2=size=320x180:rate=30:duration=2",
+ "-f", "lavfi", "-i", "sine=frequency=440:duration=2",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac",
+ ],
+ );
+ let silent_video = fixture(
+ &directory,
+ "silent.mp4",
+ &[
+ "-f", "lavfi", "-i", "testsrc2=size=320x180:rate=30:duration=2",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p",
+ ],
+ );
+ let still = fixture(
+ &directory,
+ "still.png",
+ &["-f", "lavfi", "-i", "color=red:size=320x180", "-frames:v", "1"],
+ );
+
+ // The everyday case: one clip with picture and sound.
+ let output = directory.join("plain.mp4");
+ export(&request(&output, vec![media_clip(&with_sound, "video", 0.0, 2.0, 0)]))
+ .expect("plain export");
+ let info = relay_media::probe(&output).expect("probe plain");
+ assert!(info.video.is_some() && info.audio.is_some());
+ let duration = info.duration.expect("has duration").as_f64();
+ assert!((duration - 2.0).abs() < 0.15, "expected ~2s, got {duration}");
+
+ // The regression that shipped: an audioless video in the mix. The graph
+ // must not name a stream the file does not have.
+ let output = directory.join("mixed-mute.mp4");
+ export(&request(
+ &output,
+ vec![
+ media_clip(&silent_video, "video", 0.0, 2.0, 0),
+ media_clip(&with_sound, "video", 0.5, 1.0, 1),
+ ],
+ ))
+ .expect("export with an audioless clip");
+ let info = relay_media::probe(&output).expect("probe mixed-mute");
+ assert!(info.audio.is_some(), "the sounded clip still reaches the mix");
+
+ // Retiming: a 2x clip consumes 2s of source in 1s of timeline, and
+ // picture and sound must agree on that.
+ let output = directory.join("fast.mp4");
+ let mut fast = media_clip(&with_sound, "video", 0.0, 1.0, 0);
+ fast.speed = 2.0;
+ export(&request(&output, vec![fast])).expect("2x export");
+ let info = relay_media::probe(&output).expect("probe fast");
+ let duration = info.duration.expect("has duration").as_f64();
+ assert!((duration - 1.0).abs() < 0.15, "expected ~1s at 2x, got {duration}");
+ assert!(info.audio.is_some(), "the sped-up sound made it through the graph");
+
+ // A still overlay above footage: the image decoder loops, the compositor
+ // stacks, and the export still carries the footage's sound.
+ let output = directory.join("overlay.mp4");
+ let mut overlay = media_clip(&still, "image", 0.0, 2.0, 1);
+ overlay.muted = true;
+ export(&request(
+ &output,
+ vec![media_clip(&with_sound, "video", 0.0, 2.0, 0), overlay],
+ ))
+ .expect("overlay export");
+ let info = relay_media::probe(&output).expect("probe overlay");
+ assert!(info.video.is_some() && info.audio.is_some());
+
+ // A clip whose filter chain tries to escape its slot is refused, not run.
+ let output = directory.join("hostile.mp4");
+ let mut hostile = media_clip(&with_sound, "video", 0.0, 1.0, 0);
+ hostile.filter_chain = "anull[out];[0:v]null".to_owned();
+ let refused = export(&request(&output, vec![hostile]));
+ assert!(refused.is_err(), "a graph-escaping chain must be refused");
+
+ // Cancellation aborts cleanly instead of writing a file.
+ let output = directory.join("cancelled.mp4");
+ let cancelled = AtomicBool::new(true);
+ let mut progress = |_: i64, _: i64, _: &'static str| {};
+ let result = render(
+ &request(&output, vec![media_clip(&with_sound, "video", 0.0, 2.0, 0)]),
+ Reporter { progress: &mut progress, cancel: &cancelled },
+ );
+ assert_eq!(result, Err("export cancelled".to_owned()));
+ assert!(!output.exists(), "a cancelled export must not leave a file");
+}
diff --git a/desktop/src/components/ExportDialog.tsx b/desktop/src/components/ExportDialog.tsx
index 890e0251..be6d9c37 100644
--- a/desktop/src/components/ExportDialog.tsx
+++ b/desktop/src/components/ExportDialog.tsx
@@ -4,7 +4,7 @@ import { save } from "@tauri-apps/plugin-dialog";
import { revealItemInDir } from "@tauri-apps/plugin-opener";
import type { ExportClip, ExportProgress } from "../lib/engine";
-import { exportProject, onExportProgress, writeCacheFile } from "../lib/engine";
+import { cancelExport, exportProject, onExportProgress, writeCacheFile } from "../lib/engine";
import { rasterizeTitle } from "../lib/rasterize";
import type { TextStyle } from "../lib/text";
import { shortDuration } from "../lib/time";
@@ -168,7 +168,13 @@ export function ExportDialog({
});
setPhase({ kind: "done", path });
} catch (cause) {
- setPhase({ kind: "failed", message: String(cause) });
+ const message = String(cause);
+ // A cancel is the user's own decision, not a failure to report.
+ if (message.includes("export cancelled")) {
+ setPhase({ kind: "idle" });
+ } else {
+ setPhase({ kind: "failed", message });
+ }
} finally {
unlisten.current?.();
unlisten.current = null;
@@ -317,6 +323,14 @@ export function ExportDialog({
<p className="font-technical text-[10px] tabular-nums text-tertiary">{remaining}</p>
)}
</div>
+ <button
+ type="button"
+ onClick={() => void cancelExport().catch(() => undefined)}
+ className="mt-4 w-full cursor-pointer rounded-lg bg-hover px-4 py-2 text-xs
+ text-secondary transition-colors hover:bg-active hover:text-primary"
+ >
+ Cancel
+ </button>
</div>
) : (
<div className="py-1">
diff --git a/desktop/src/lib/engine.ts b/desktop/src/lib/engine.ts
index 70cbd21e..6a41fb3f 100644
--- a/desktop/src/lib/engine.ts
+++ b/desktop/src/lib/engine.ts
@@ -171,6 +171,14 @@ export async function exportProject(request: ExportRequest): Promise<string> {
return invoke<string>("export_project", { request });
}
+/**
+ * Asks the running export to stop at the next frame. The pending
+ * `exportProject` call then rejects with "export cancelled".
+ */
+export async function cancelExport(): Promise<void> {
+ return invoke<void>("cancel_export");
+}
+
/**
* Writes one file into the project's cache folder and returns its path.
*
diff --git a/engine/Cargo.lock b/engine/Cargo.lock
index 021a8f0d..22270340 100644
--- a/engine/Cargo.lock
+++ b/engine/Cargo.lock
@@ -11,6 +11,21 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "anstream"
version = "1.0.0"
@@ -61,6 +76,27 @@ dependencies = [
"windows-sys",
]
+[[package]]
+name = "arrayvec"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
+
+[[package]]
+name = "ash"
+version = "0.38.0+1.3.281"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"
+dependencies = [
+ "libloading",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+
[[package]]
name = "bindgen"
version = "0.72.1"
@@ -76,17 +112,67 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "rustc-hash",
+ "rustc-hash 2.1.3",
"shlex",
"syn 2.0.119",
]
+[[package]]
+name = "bit-set"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"
+
[[package]]
name = "bitflags"
version = "2.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
+[[package]]
+name = "block2"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
+dependencies = [
+ "objc2",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.20.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
+
+[[package]]
+name = "bytemuck"
+version = "1.25.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797"
+dependencies = [
+ "bytemuck_derive",
+]
+
+[[package]]
+name = "bytemuck_derive"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
+
[[package]]
name = "camino"
version = "1.2.5"
@@ -108,6 +194,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+[[package]]
+name = "cfg_aliases"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
+
[[package]]
name = "clang-sys"
version = "1.9.1"
@@ -160,275 +252,831 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
[[package]]
-name = "colorchoice"
-version = "1.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
-
-[[package]]
-name = "either"
-version = "1.18.0"
+name = "codespan-reporting"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
+checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"
+dependencies = [
+ "serde",
+ "termcolor",
+ "unicode-width",
+]
[[package]]
-name = "glob"
-version = "0.3.4"
+name = "colorchoice"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
[[package]]
-name = "heck"
-version = "0.5.0"
+name = "crunchy"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
[[package]]
-name = "is_terminal_polyfill"
-version = "1.70.2"
+name = "dispatch2"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
+dependencies = [
+ "bitflags",
+ "objc2",
+]
[[package]]
-name = "itertools"
-version = "0.13.0"
+name = "dlib"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
+checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a"
dependencies = [
- "either",
+ "libloading",
]
[[package]]
-name = "itoa"
-version = "1.0.18"
+name = "document-features"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
+checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"
+dependencies = [
+ "litrs",
+]
[[package]]
-name = "libc"
-version = "0.2.189"
+name = "either"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
+checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
[[package]]
-name = "libloading"
-version = "0.8.9"
+name = "equivalent"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
-dependencies = [
- "cfg-if",
- "windows-link",
-]
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
-name = "log"
-version = "0.4.34"
+name = "foldhash"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
[[package]]
-name = "memchr"
-version = "2.8.3"
+name = "futures-core"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
[[package]]
-name = "minimal-lexical"
-version = "0.2.1"
+name = "futures-task"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
[[package]]
-name = "nom"
-version = "7.1.3"
+name = "futures-util"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
dependencies = [
- "memchr",
- "minimal-lexical",
+ "futures-core",
+ "futures-task",
+ "pin-project-lite",
+ "slab",
]
[[package]]
-name = "once_cell"
-version = "1.21.4"
+name = "gl_generator"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
+dependencies = [
+ "khronos_api",
+ "log",
+ "xml-rs",
+]
[[package]]
-name = "once_cell_polyfill"
-version = "1.70.2"
+name = "glob"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
[[package]]
-name = "pkg-config"
-version = "0.3.34"
+name = "glow"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
+checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5"
+dependencies = [
+ "js-sys",
+ "slotmap",
+ "wasm-bindgen",
+ "web-sys",
+]
[[package]]
-name = "prettyplease"
-version = "0.2.37"
+name = "glutin_wgl_sys"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e"
dependencies = [
- "proc-macro2",
- "syn 2.0.119",
+ "gl_generator",
]
[[package]]
-name = "proc-macro2"
-version = "1.0.107"
+name = "gpu-allocator"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795"
dependencies = [
- "unicode-ident",
+ "ash",
+ "hashbrown 0.16.1",
+ "log",
+ "presser",
+ "thiserror",
+ "windows",
]
[[package]]
-name = "quote"
-version = "1.0.47"
+name = "half"
+version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
dependencies = [
- "proc-macro2",
+ "cfg-if",
+ "crunchy",
+ "num-traits",
+ "zerocopy",
]
[[package]]
-name = "regex"
-version = "1.13.1"
+name = "hashbrown"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
]
[[package]]
-name = "regex-automata"
-version = "0.4.18"
+name = "hashbrown"
+version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
+ "foldhash",
]
[[package]]
-name = "regex-syntax"
-version = "0.8.11"
+name = "heck"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
-name = "relay-cli"
-version = "0.1.0"
+name = "indexmap"
+version = "2.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
dependencies = [
- "clap",
- "relay-core",
- "relay-media",
- "relay-render",
+ "equivalent",
+ "hashbrown 0.17.1",
]
[[package]]
-name = "relay-core"
-version = "0.1.0"
-
-[[package]]
-name = "relay-media"
-version = "0.1.0"
-dependencies = [
- "relay-core",
- "rusty_ffmpeg",
- "serde_json",
- "thiserror",
-]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
-name = "relay-render"
-version = "0.1.0"
+name = "itertools"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
- "relay-core",
+ "either",
]
[[package]]
-name = "rustc-hash"
-version = "2.1.3"
+name = "itoa"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
[[package]]
-name = "rusty_ffmpeg"
-version = "0.17.0+ffmpeg.8.1"
+name = "jni-sys"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2af9fcc780549d620ddedd4d9f26d62c523f221c0db882ea75e8a5ffe2fff9a"
+checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"
dependencies = [
- "bindgen",
- "camino",
- "once_cell",
- "pkg-config",
+ "jni-sys 0.4.1",
]
[[package]]
-name = "serde"
-version = "1.0.229"
+name = "jni-sys"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
dependencies = [
- "serde_core",
+ "jni-sys-macros",
]
[[package]]
-name = "serde_core"
-version = "1.0.229"
+name = "jni-sys-macros"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
dependencies = [
- "serde_derive",
+ "quote",
+ "syn 2.0.119",
]
[[package]]
-name = "serde_derive"
-version = "1.0.229"
+name = "js-sys"
+version = "0.3.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"
dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.4",
+ "cfg-if",
+ "futures-util",
+ "wasm-bindgen",
]
[[package]]
-name = "serde_json"
-version = "1.0.151"
+name = "khronos-egl"
+version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
+checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
dependencies = [
- "itoa",
- "memchr",
- "serde",
- "serde_core",
- "zmij",
+ "libc",
+ "libloading",
+ "pkg-config",
]
[[package]]
-name = "shlex"
-version = "1.3.0"
+name = "khronos_api"
+version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
[[package]]
-name = "strsim"
-version = "0.11.1"
+name = "libc"
+version = "0.2.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
[[package]]
-name = "syn"
-version = "2.0.119"
+name = "libloading"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
+dependencies = [
+ "cfg-if",
+ "windows-link",
+]
+
+[[package]]
+name = "libm"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
+
+[[package]]
+name = "litrs"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
+
+[[package]]
+name = "lock_api"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+dependencies = [
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "naga"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130"
+dependencies = [
+ "arrayvec",
+ "bit-set",
+ "bitflags",
+ "cfg-if",
+ "cfg_aliases",
+ "codespan-reporting",
+ "half",
+ "hashbrown 0.17.1",
+ "indexmap",
+ "libm",
+ "log",
+ "naga-types",
+ "num-traits",
+ "once_cell",
+ "rustc-hash 1.1.0",
+ "spirv",
+ "thiserror",
+ "unicode-ident",
+]
+
+[[package]]
+name = "naga-types"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49"
+dependencies = [
+ "hashbrown 0.17.1",
+ "indexmap",
+ "rustc-hash 1.1.0",
+ "thiserror",
+]
+
+[[package]]
+name = "ndk-sys"
+version = "0.6.0+11769913"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
+dependencies = [
+ "jni-sys 0.3.1",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+ "libm",
+]
+
+[[package]]
+name = "objc2"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
+dependencies = [
+ "objc2-encode",
+]
+
+[[package]]
+name = "objc2-core-foundation"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
+dependencies = [
+ "bitflags",
+ "dispatch2",
+ "objc2",
+]
+
+[[package]]
+name = "objc2-core-graphics"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"
+dependencies = [
+ "dispatch2",
+ "objc2",
+ "objc2-core-foundation",
+ "objc2-io-surface",
+]
+
+[[package]]
+name = "objc2-encode"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
+
+[[package]]
+name = "objc2-foundation"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
+dependencies = [
+ "bitflags",
+ "objc2",
+ "objc2-core-foundation",
+]
+
+[[package]]
+name = "objc2-io-surface"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"
+dependencies = [
+ "bitflags",
+ "objc2",
+ "objc2-core-foundation",
+]
+
+[[package]]
+name = "objc2-metal"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
+dependencies = [
+ "bitflags",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-quartz-core"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"
+dependencies = [
+ "bitflags",
+ "objc2",
+ "objc2-core-foundation",
+ "objc2-core-graphics",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+
+[[package]]
+name = "ordered-float"
+version = "5.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-link",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
+
+[[package]]
+name = "pollster"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"
+
+[[package]]
+name = "portable-atomic"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
+
+[[package]]
+name = "portable-atomic-util"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618"
+dependencies = [
+ "portable-atomic",
+]
+
+[[package]]
+name = "presser"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
+
+[[package]]
+name = "prettyplease"
+version = "0.2.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+dependencies = [
+ "proc-macro2",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "profiling"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5"
+
+[[package]]
+name = "quote"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "range-alloc"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"
+
+[[package]]
+name = "raw-window-handle"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+
+[[package]]
+name = "raw-window-metal"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135"
+dependencies = [
+ "objc2",
+ "objc2-core-foundation",
+ "objc2-foundation",
+ "objc2-quartz-core",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
+
+[[package]]
+name = "relay-cli"
+version = "0.1.0"
+dependencies = [
+ "clap",
+ "relay-core",
+ "relay-media",
+ "relay-render",
+]
+
+[[package]]
+name = "relay-core"
+version = "0.1.0"
+
+[[package]]
+name = "relay-media"
+version = "0.1.0"
+dependencies = [
+ "relay-core",
+ "rusty_ffmpeg",
+ "serde_json",
+ "thiserror",
+]
+
+[[package]]
+name = "relay-render"
+version = "0.1.0"
+dependencies = [
+ "pollster",
+ "relay-core",
+ "wgpu",
+]
+
+[[package]]
+name = "renderdoc-sys"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustc-hash"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
+
+[[package]]
+name = "rustversion"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
+
+[[package]]
+name = "rusty_ffmpeg"
+version = "0.17.0+ffmpeg.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2af9fcc780549d620ddedd4d9f26d62c523f221c0db882ea75e8a5ffe2fff9a"
+dependencies = [
+ "bindgen",
+ "camino",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "serde"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.151"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
+dependencies = [
+ "itoa",
+ "memchr",
+ "serde",
+ "serde_core",
+ "zmij",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "slotmap"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038"
+dependencies = [
+ "version_check",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
+
+[[package]]
+name = "spirv"
+version = "0.4.0+sdk-1.4.341.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "syn"
+version = "2.0.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
dependencies = [
@@ -448,6 +1096,15 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "termcolor"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
+dependencies = [
+ "winapi-util",
+]
+
[[package]]
name = "thiserror"
version = "2.0.20"
@@ -474,18 +1131,384 @@ version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+[[package]]
+name = "unicode-width"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"
+dependencies = [
+ "bumpalo",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "wayland-sys"
+version = "0.31.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be"
+dependencies = [
+ "dlib",
+ "log",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "wgpu"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e"
+dependencies = [
+ "arrayvec",
+ "bitflags",
+ "bytemuck",
+ "cfg-if",
+ "cfg_aliases",
+ "document-features",
+ "hashbrown 0.17.1",
+ "js-sys",
+ "log",
+ "naga",
+ "parking_lot",
+ "portable-atomic",
+ "profiling",
+ "raw-window-handle",
+ "smallvec",
+ "static_assertions",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "wgpu-core",
+ "wgpu-hal",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-core"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14"
+dependencies = [
+ "arrayvec",
+ "bit-set",
+ "bit-vec",
+ "bitflags",
+ "bytemuck",
+ "cfg_aliases",
+ "document-features",
+ "hashbrown 0.17.1",
+ "indexmap",
+ "log",
+ "naga",
+ "naga-types",
+ "once_cell",
+ "parking_lot",
+ "portable-atomic",
+ "profiling",
+ "raw-window-handle",
+ "rustc-hash 1.1.0",
+ "smallvec",
+ "thiserror",
+ "wgpu-core-deps-apple",
+ "wgpu-core-deps-emscripten",
+ "wgpu-core-deps-windows-linux-android",
+ "wgpu-hal",
+ "wgpu-naga-bridge",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-core-deps-apple"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68"
+dependencies = [
+ "wgpu-hal",
+]
+
+[[package]]
+name = "wgpu-core-deps-emscripten"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86"
+dependencies = [
+ "wgpu-hal",
+]
+
+[[package]]
+name = "wgpu-core-deps-windows-linux-android"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f"
+dependencies = [
+ "wgpu-hal",
+]
+
+[[package]]
+name = "wgpu-hal"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58"
+dependencies = [
+ "android_system_properties",
+ "arrayvec",
+ "ash",
+ "bit-set",
+ "bitflags",
+ "block2",
+ "bytemuck",
+ "cfg-if",
+ "cfg_aliases",
+ "glow",
+ "glutin_wgl_sys",
+ "gpu-allocator",
+ "hashbrown 0.17.1",
+ "js-sys",
+ "khronos-egl",
+ "libc",
+ "libloading",
+ "log",
+ "naga",
+ "naga-types",
+ "ndk-sys",
+ "objc2",
+ "objc2-core-foundation",
+ "objc2-core-graphics",
+ "objc2-foundation",
+ "objc2-metal",
+ "objc2-quartz-core",
+ "once_cell",
+ "ordered-float",
+ "parking_lot",
+ "portable-atomic",
+ "portable-atomic-util",
+ "profiling",
+ "range-alloc",
+ "raw-window-handle",
+ "raw-window-metal",
+ "renderdoc-sys",
+ "smallvec",
+ "static_assertions",
+ "thiserror",
+ "wasm-bindgen",
+ "wayland-sys",
+ "web-sys",
+ "wgpu-naga-bridge",
+ "wgpu-types",
+ "windows",
+ "windows-core",
+ "windows-result",
+]
+
+[[package]]
+name = "wgpu-naga-bridge"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081"
+dependencies = [
+ "naga",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-types"
+version = "30.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286"
+dependencies = [
+ "bitflags",
+ "bytemuck",
+ "js-sys",
+ "log",
+ "naga-types",
+ "raw-window-handle",
+ "static_assertions",
+ "web-sys",
+]
+
+[[package]]
+name = "winapi-util"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
+dependencies = [
+ "windows-collections",
+ "windows-core",
+ "windows-future",
+ "windows-numerics",
+]
+
+[[package]]
+name = "windows-collections"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
+dependencies = [
+ "windows-core",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-future"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
+dependencies = [
+ "windows-core",
+ "windows-link",
+ "windows-threading",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+[[package]]
+name = "windows-numerics"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
+dependencies = [
+ "windows-core",
+ "windows-link",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
+dependencies = [
+ "windows-link",
+]
+
[[package]]
name = "windows-sys"
version = "0.61.2"
@@ -495,6 +1518,41 @@ dependencies = [
"windows-link",
]
+[[package]]
+name = "windows-threading"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "xml-rs"
+version = "0.8.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7"
+
+[[package]]
+name = "zerocopy"
+version = "0.8.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
[[package]]
name = "zmij"
version = "1.0.23"
diff --git a/engine/Cargo.toml b/engine/Cargo.toml
index 8534f40f..69422e92 100644
--- a/engine/Cargo.toml
+++ b/engine/Cargo.toml
@@ -17,6 +17,11 @@ serde_json = "1"
thiserror = "2"
clap = { version = "4", features = ["derive"] }
+# The GPU compositor, behind relay-render's `gpu` feature. A heavy tree, which
+# is exactly why it is optional: engine-only work never pays for it.
+wgpu = "30"
+pollster = "0.4"
+
[workspace.lints.rust]
missing_docs = "warn"
diff --git a/engine/crates/relay-core/src/time.rs b/engine/crates/relay-core/src/time.rs
index 0c5ca5d2..3abb4d7d 100644
--- a/engine/crates/relay-core/src/time.rs
+++ b/engine/crates/relay-core/src/time.rs
@@ -94,13 +94,28 @@ impl Rational {
fn reduce(num: i128, den: i128) -> Self {
assert!(den != 0, "Rational denominator must not be zero");
+ Self::checked_reduce(num, den).expect("rational overflowed i64")
+ }
+
+ /// Builds `num / den` in lowest terms, or `None` when the value cannot be
+ /// represented. The non-panicking path for numbers that come from a file
+ /// rather than from our own arithmetic - a hostile container must produce
+ /// an error, never a crash.
+ pub fn checked_new(num: i128, den: i128) -> Option<Self> {
+ if den == 0 {
+ return None;
+ }
+ Self::checked_reduce(num, den)
+ }
+
+ fn checked_reduce(num: i128, den: i128) -> Option<Self> {
let (num, den) = if den < 0 { (-num, -den) } else { (num, den) };
let divisor = gcd(num, den).max(1);
let (num, den) = (num / divisor, den / divisor);
- Self {
- num: i64::try_from(num).expect("rational numerator overflowed i64"),
- den: i64::try_from(den).expect("rational denominator overflowed i64"),
- }
+ Some(Self {
+ num: i64::try_from(num).ok()?,
+ den: i64::try_from(den).ok()?,
+ })
}
/// The numerator, in lowest terms.
@@ -153,6 +168,23 @@ impl Rational {
}
}
+ /// The nearest rational with denominator 1,000,000 - the seam where a
+ /// UI's `f64` becomes exact. Returns `None` for NaN or infinite values and
+ /// for magnitudes an `i64` of microseconds cannot hold.
+ ///
+ /// This is for values *entering* the engine. Values that are already
+ /// `Rational` must never round-trip through here.
+ pub fn approximate(value: f64) -> Option<Self> {
+ if !value.is_finite() {
+ return None;
+ }
+ let scaled = (value * 1_000_000.0).round();
+ if scaled.abs() >= i64::MAX as f64 {
+ return None;
+ }
+ Some(Self::new(scaled as i64, 1_000_000))
+ }
+
/// Lossy conversion, for display and for arguments handed to FFmpeg.
///
/// Do not convert back. If a value round-trips through `f64` it is no
diff --git a/engine/crates/relay-core/src/timeline.rs b/engine/crates/relay-core/src/timeline.rs
index c97cdad8..69ec76c9 100644
--- a/engine/crates/relay-core/src/timeline.rs
+++ b/engine/crates/relay-core/src/timeline.rs
@@ -59,6 +59,13 @@ pub struct Clip {
pub start: Rational,
/// How long the clip runs on the timeline.
pub duration: Rational,
+ /// Playback rate: source seconds consumed per timeline second. One is
+ /// normal speed. Always positive - enforce at the boundary that sets it.
+ ///
+ /// This is the *only* definition of retiming. Everything downstream - the
+ /// frame plan, the export decoder rate, the audio graph - derives from it,
+ /// so picture and sound cannot disagree about what a sped-up clip means.
+ pub speed: Rational,
/// Blend factor in `0.0..=1.0`, applied over whatever is beneath.
pub opacity: f32,
/// How the picture sits in the frame. Identity is fitted and centred.
@@ -108,6 +115,7 @@ impl Clip {
source_start: Rational::ZERO,
start,
duration,
+ speed: Rational::ONE,
opacity: 1.0,
transform: Transform::IDENTITY,
}
@@ -126,10 +134,17 @@ impl Clip {
/// Converts a timeline timestamp into a timestamp within the source media,
/// or `None` if the clip is not on screen then.
///
- /// This is the one piece of arithmetic that every trim, ripple and slip
- /// operation ultimately has to agree with, so it lives in exactly one place.
+ /// An affine map: `source_start + (time - start) * speed`. This is the one
+ /// piece of arithmetic that every trim, ripple, slip and retime operation
+ /// ultimately has to agree with, so it lives in exactly one place.
pub fn source_time_at(&self, time: Rational) -> Option<Rational> {
- self.contains(time).then(|| self.source_start + (time - self.start))
+ self.contains(time)
+ .then(|| self.source_start + (time - self.start) * self.speed)
+ }
+
+ /// How much of the source this clip consumes: `duration * speed`.
+ pub fn source_duration(&self) -> Rational {
+ self.duration * self.speed
}
}
@@ -329,6 +344,28 @@ mod tests {
assert_eq!(clip.source_time_at(seconds(5)), None, "the end is exclusive");
}
+ #[test]
+ fn speed_scales_the_source_time_map() {
+ let (mut timeline, _, id) = fixture();
+ {
+ let clip = timeline.clip_mut(id).expect("clip exists");
+ clip.speed = Rational::from_int(2);
+ clip.source_start = seconds(10);
+ }
+ let clip = timeline.clip(id).expect("clip exists");
+
+ // The clip covers timeline [2, 5) at 2x, so it consumes source [10, 16).
+ assert_eq!(clip.source_time_at(seconds(2)), Some(seconds(10)));
+ assert_eq!(clip.source_time_at(seconds(4)), Some(seconds(14)));
+ assert_eq!(clip.source_duration(), seconds(6));
+
+ // Half speed consumes half the source.
+ timeline.clip_mut(id).expect("clip exists").speed = Rational::new(1, 2);
+ let clip = timeline.clip(id).expect("clip exists");
+ assert_eq!(clip.source_time_at(seconds(4)), Some(seconds(11)));
+ assert_eq!(clip.source_duration(), Rational::new(3, 2));
+ }
+
#[test]
fn an_in_point_offsets_the_source_time() {
let (mut timeline, _, id) = fixture();
diff --git a/engine/crates/relay-media/src/audio.rs b/engine/crates/relay-media/src/audio.rs
new file mode 100644
index 00000000..3ff01777
--- /dev/null
+++ b/engine/crates/relay-media/src/audio.rs
@@ -0,0 +1,374 @@
+//! Planning and running the audio mix.
+//!
+//! The audio equivalent of `relay-render`'s frame plan: [`mix_graph`] turns a
+//! set of audible clips into one FFmpeg `filter_complex`, as a pure function
+//! that is unit-tested without running anything. [`mix_to_file`] and [`mux`]
+//! then hand the plan to FFmpeg.
+//!
+//! This lives in the engine, not the app host, so that there is exactly one
+//! definition of what speed, fades and gain mean for sound - the same reason
+//! `Clip::source_time_at` is the one definition for picture.
+
+use std::path::Path;
+
+use crate::error::{Error, Result};
+use crate::process::{base_command, run_to_completion};
+
+/// Name used in error messages; the binary run comes from [`crate::ffmpeg`].
+const FFMPEG: &str = "ffmpeg";
+
+/// The rate everything is mixed at.
+pub const MIX_RATE: u32 = 48_000;
+
+/// The playback rates the engine supports, as source-seconds per
+/// timeline-second. One definition, shared by preview and export - the two
+/// disagreeing at the extremes is how a preview stops matching its render.
+pub const SPEED_RANGE: std::ops::RangeInclusive<f64> = 0.0625..=16.0;
+
+/// Clamps a rate into [`SPEED_RANGE`].
+pub fn clamp_speed(speed: f64) -> f64 {
+ speed.clamp(*SPEED_RANGE.start(), *SPEED_RANGE.end())
+}
+
+/// One audible clip, in timeline terms.
+#[derive(Clone, Debug)]
+pub struct AudioClip {
+ /// The media file.
+ pub path: std::path::PathBuf,
+ /// Where the clip sits on the timeline, in seconds.
+ pub start: f64,
+ /// How long it runs on the timeline, in seconds.
+ pub duration: f64,
+ /// Seconds into the source file where the clip begins.
+ pub source_start: f64,
+ /// Source seconds consumed per timeline second. One is normal.
+ pub speed: f64,
+ /// True holds pitch while the rate changes; false is the tape effect.
+ pub preserve_pitch: bool,
+ /// Linear gain, one being unity.
+ pub volume: f64,
+ /// Fade up over this many seconds from the clip's start.
+ pub fade_in: f64,
+ /// Fade out over this many seconds into the clip's end.
+ pub fade_out: f64,
+ /// Extra FFmpeg audio filters, or empty. Validated, not trusted.
+ pub filter_chain: String,
+}
+
+/// Refuses a filter chain that could break out of its slot in the graph.
+///
+/// A chain is spliced into a `filter_complex`, where `;` starts a new chain
+/// and `[..]` rebinds streams - a chain containing either is no longer a
+/// filter applied to this clip, whatever else it might be.
+pub fn validate_chain(chain: &str) -> Result<()> {
+ let forbidden = |c: char| matches!(c, ';' | '[' | ']' | '\n' | '\r');
+ match chain.chars().find(|&c| forbidden(c)) {
+ None => Ok(()),
+ Some(found) => Err(Error::InvalidFilterChain {
+ chain: chain.to_owned(),
+ detail: format!("contains {found:?}, which would escape the clip's filter slot"),
+ }),
+ }
+}
+
+/// The filters that retime one clip, in order. Empty at normal speed.
+///
+/// Pitch-preserving uses `atempo`, staged because one instance only accepts
+/// [0.5, 2]. The tape effect first lands on [`MIX_RATE`] so the rate shift is
+/// exact whatever the source's rate was, then shifts, then lands back.
+pub fn speed_filters(speed: f64, preserve_pitch: bool) -> Vec<String> {
+ let speed = clamp_speed(speed);
+ if (speed - 1.0).abs() < f64::EPSILON {
+ return Vec::new();
+ }
+ if preserve_pitch {
+ tempo_stages(speed).iter().map(|factor| format!("atempo={factor:.6}")).collect()
+ } else {
+ vec![
+ format!("aresample={MIX_RATE}"),
+ format!("asetrate={MIX_RATE}*{speed:.6}"),
+ format!("aresample={MIX_RATE}"),
+ ]
+ }
+}
+
+/// Splits a rate into `atempo` stages that each stay inside its valid range.
+///
+/// One filter instance is limited, so 4x has to become 2x then 2x. Multiplying
+/// the stages back together is what keeps the result exact.
+pub fn tempo_stages(speed: f64) -> Vec<f64> {
+ let mut stages = Vec::new();
+ let mut remaining = clamp_speed(speed);
+
+ while remaining > 2.0 {
+ stages.push(2.0);
+ remaining /= 2.0;
+ }
+ while remaining < 0.5 {
+ stages.push(0.5);
+ remaining /= 0.5;
+ }
+
+ stages.push(remaining);
+ stages
+}
+
+/// Builds the `filter_complex` that trims, retimes, shapes, delays and mixes
+/// every clip into one `[out]` stream of exactly `duration` seconds.
+///
+/// Input `N` in the command must be `clips[N].path`, and every input must
+/// actually contain an audio stream - FFmpeg refuses a graph that names
+/// `[N:a]` on a silent input rather than treating it as silence. The caller
+/// decides membership by probing; this function decides what the mix means.
+pub fn mix_graph(clips: &[AudioClip], duration: f64) -> Result<String> {
+ let mut chains: Vec<String> = Vec::new();
+
+ for (index, clip) in clips.iter().enumerate() {
+ validate_chain(&clip.filter_chain)?;
+ let delay_ms = (clip.start * 1000.0).round().max(0.0) as i64;
+ let speed = clamp_speed(clip.speed);
+
+ // Each input is trimmed to its in-point, restamped from zero, then
+ // delayed to where it sits on the timeline. `all=1` applies the delay
+ // to every channel; without it only the left channel moves, which is
+ // a memorable way to discover the flag exists.
+ //
+ // A sped-up clip covers more source than its timeline length, so the
+ // trim takes `duration * speed` before the rate is applied.
+ let mut stage = format!(
+ "[{index}:a]atrim=start={:.6}:duration={:.6},asetpts=PTS-STARTPTS",
+ clip.source_start,
+ clip.duration * speed
+ );
+
+ for filter in speed_filters(speed, clip.preserve_pitch) {
+ stage.push(',');
+ stage.push_str(&filter);
+ }
+
+ // Filters first: they are what the clip *is* now, and gain and fades
+ // are adjustments applied to that result. Reversing the order would
+ // let a compressor inside a filter chain undo the fade.
+ if !clip.filter_chain.is_empty() {
+ stage.push(',');
+ stage.push_str(&clip.filter_chain);
+ }
+
+ if (clip.volume - 1.0).abs() > f64::EPSILON {
+ stage.push_str(&format!(",volume={:.4}", clip.volume.max(0.0)));
+ }
+ if clip.fade_in > 0.0 {
+ stage.push_str(&format!(",afade=t=in:st=0:d={:.4}", clip.fade_in));
+ }
+ if clip.fade_out > 0.0 {
+ let start = (clip.duration - clip.fade_out).max(0.0);
+ stage.push_str(&format!(",afade=t=out:st={start:.4}:d={:.4}", clip.fade_out));
+ }
+
+ stage.push_str(&format!(",adelay={delay_ms}:all=1[a{index}]"));
+ chains.push(stage);
+ }
+
+ let inputs: String = (0..clips.len()).map(|index| format!("[a{index}]")).collect();
+ let mix = if clips.len() == 1 {
+ // amix with one input would still apply its normalisation curve.
+ format!("{inputs}anull[mixed]")
+ } else {
+ format!("{inputs}amix=inputs={}:normalize=0[mixed]", clips.len())
+ };
+
+ // The `aresample` is load-bearing, and not about sample rates.
+ //
+ // `atempo` emits a fractional number of samples per frame, and the leftover
+ // rides along in the timestamps it produces. Mixing such a branch with an
+ // untouched one gave `amix` an output whose timestamps eventually came out
+ // as AV_NOPTS_VALUE, and the muxer rejected the packet:
+ //
+ // non monotonically increasing dts to muxer: 9223372036854775807
+ //
+ // The effect was a two-second mix written as a ~40 ms file - so any export
+ // of more than one clip, where any clip had a speed other than 1 with
+ // "preserve pitch" on, produced a silently truncated soundtrack. The
+ // exporter reported success either way, which is how it went unnoticed.
+ //
+ // Passing the mix through the resampler regenerates one continuous
+ // timestamp series from the sample count and absorbs the drift. Verified
+ // against every shape this function emits: both speed directions, the
+ // multi-stage `atempo` used beyond 2x, the `asetrate` path, several clips
+ // at once, and the single-clip `anull` path.
+ //
+ // Do not "simplify" this away because the rate on both sides is MIX_RATE.
+ chains.push(format!(
+ "{mix};[mixed]aresample={MIX_RATE},apad,atrim=duration={duration:.6}[out]"
+ ));
+
+ Ok(chains.join(";"))
+}
+
+/// Mixes `clips` into one AAC file at `destination`.
+///
+/// Every clip's file must contain an audio stream; see [`mix_graph`].
+pub fn mix_to_file(clips: &[AudioClip], duration: f64, destination: &Path) -> Result<()> {
+ let graph = mix_graph(clips, duration)?;
+
+ let mut command = base_command(crate::binaries::ffmpeg());
+ command.arg("-y");
+ for clip in clips {
+ command.arg("-i").arg(&clip.path);
+ }
+ command
+ .args(["-filter_complex", &graph])
+ .args(["-map", "[out]"])
+ .args(["-c:a", "aac", "-b:a", "192k"])
+ .arg(destination);
+
+ run_to_completion(&mut command, FFMPEG, destination)
+}
+
+/// Joins an already-encoded video file and audio file into `output`.
+///
+/// Streams are copied, not re-encoded: the picture is already exactly as
+/// asked, and a second pass would cost time and a generation of quality.
+pub fn mux(video: &Path, audio: &Path, output: &Path) -> Result<()> {
+ let mut command = base_command(crate::binaries::ffmpeg());
+ command
+ .arg("-y")
+ .arg("-i")
+ .arg(video)
+ .arg("-i")
+ .arg(audio)
+ .args(["-c:v", "copy", "-c:a", "copy", "-shortest"])
+ .args(["-movflags", "+faststart"])
+ .arg(output);
+
+ run_to_completion(&mut command, FFMPEG, output)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ fn clip(path: &str) -> AudioClip {
+ AudioClip {
+ path: path.into(),
+ start: 0.0,
+ duration: 2.0,
+ source_start: 0.0,
+ speed: 1.0,
+ preserve_pitch: true,
+ volume: 1.0,
+ fade_in: 0.0,
+ fade_out: 0.0,
+ filter_chain: String::new(),
+ }
+ }
+
+ #[test]
+ fn tempo_stages_multiply_back_to_the_requested_rate() {
+ for speed in [0.25, 0.5, 0.9, 1.0, 1.5, 2.0, 3.0, 4.0, 8.0] {
+ let product: f64 = tempo_stages(speed).iter().product();
+ assert!(
+ (product - speed).abs() < 1e-9,
+ "stages for {speed} multiplied to {product}",
+ );
+ }
+ }
+
+ #[test]
+ fn every_stage_is_within_the_filter_range() {
+ for speed in [0.0625, 0.25, 0.5, 1.0, 4.0, 8.0, 16.0] {
+ for factor in tempo_stages(speed) {
+ assert!(
+ (0.5..=2.0).contains(&factor),
+ "{factor} is outside atempo's range, from speed {speed}",
+ );
+ }
+ }
+ }
+
+ #[test]
+ fn out_of_range_speeds_clamp_rather_than_explode() {
+ assert_eq!(clamp_speed(0.0), 0.0625);
+ assert_eq!(clamp_speed(100.0), 16.0);
+ assert_eq!(clamp_speed(1.0), 1.0);
+ }
+
+ #[test]
+ fn normal_speed_needs_no_filters() {
+ assert!(speed_filters(1.0, true).is_empty());
+ assert!(speed_filters(1.0, false).is_empty());
+ }
+
+ #[test]
+ fn the_tape_effect_lands_on_the_mix_rate_before_shifting() {
+ let filters = speed_filters(2.0, false);
+ assert_eq!(filters[0], "aresample=48000", "the shift must start from a known rate");
+ assert!(filters[1].starts_with("asetrate=48000*"));
+ assert_eq!(filters[2], "aresample=48000");
+ }
+
+ #[test]
+ fn a_single_clip_avoids_amix_normalisation() {
+ let graph = mix_graph(&[clip("a.mp4")], 2.0).expect("valid");
+ assert!(graph.contains("anull[mixed]"), "graph was: {graph}");
+ assert!(!graph.contains("amix"), "graph was: {graph}");
+ }
+
+ #[test]
+ fn several_clips_mix_without_normalisation() {
+ let graph = mix_graph(&[clip("a.mp4"), clip("b.mp4")], 3.0).expect("valid");
+ assert!(graph.contains("amix=inputs=2:normalize=0"), "graph was: {graph}");
+ assert!(graph.contains("[0:a]") && graph.contains("[1:a]"), "graph was: {graph}");
+ }
+
+ #[test]
+ fn the_final_stage_pads_and_trims_to_the_timeline_duration() {
+ let graph = mix_graph(&[clip("a.mp4")], 4.5).expect("valid");
+ assert!(
+ graph.ends_with("aresample=48000,apad,atrim=duration=4.500000[out]"),
+ "graph was: {graph}"
+ );
+ }
+
+ #[test]
+ fn a_sped_up_clip_trims_more_source_than_its_timeline_length() {
+ let mut fast = clip("a.mp4");
+ fast.speed = 2.0;
+ let graph = mix_graph(&[fast], 2.0).expect("valid");
+ assert!(graph.contains("duration=4.000000"), "graph was: {graph}");
+ assert!(graph.contains("atempo=2.000000"), "graph was: {graph}");
+ }
+
+ #[test]
+ fn fades_and_volume_apply_after_the_filter_chain() {
+ let mut shaped = clip("a.mp4");
+ shaped.filter_chain = "highpass=f=80".to_owned();
+ shaped.volume = 0.5;
+ shaped.fade_out = 0.25;
+ let graph = mix_graph(&[shaped], 2.0).expect("valid");
+
+ let chain_at = graph.find("highpass").expect("chain present");
+ let volume_at = graph.find(",volume=").expect("volume present");
+ let fade_at = graph.find(",afade=t=out").expect("fade present");
+ assert!(chain_at < volume_at && volume_at < fade_at, "graph was: {graph}");
+ }
+
+ #[test]
+ fn a_chain_that_escapes_its_slot_is_refused() {
+ for bad in ["volume=2;amovie=x[a]", "anull[a1]", "a\nb"] {
+ let mut hostile = clip("a.mp4");
+ hostile.filter_chain = bad.to_owned();
+ assert!(
+ matches!(mix_graph(&[hostile], 2.0), Err(Error::InvalidFilterChain { .. })),
+ "{bad:?} should have been refused",
+ );
+ }
+ }
+
+ #[test]
+ fn ordinary_chains_pass_validation() {
+ for good in ["", "highpass=f=80,equalizer=f=300:t=q:w=1.1:g=-1.4", "volume=0.5"] {
+ assert!(validate_chain(good).is_ok(), "{good:?} should be fine");
+ }
+ }
+}
diff --git a/engine/crates/relay-media/src/binaries.rs b/engine/crates/relay-media/src/binaries.rs
index 9f6c442a..c85a55df 100644
--- a/engine/crates/relay-media/src/binaries.rs
+++ b/engine/crates/relay-media/src/binaries.rs
@@ -13,27 +13,30 @@
use std::path::{Path, PathBuf};
use std::sync::OnceLock;
-static FFMPEG: OnceLock<PathBuf> = OnceLock::new();
-static FFPROBE: OnceLock<PathBuf> = OnceLock::new();
+/// One cell for the pair, so two racing first-callers can never produce a
+/// mixed set - the decoder from one install, the prober from another.
+static BINARIES: OnceLock<(PathBuf, PathBuf)> = OnceLock::new();
/// Points the crate at a specific pair of binaries.
///
/// Returns `false` if they were already resolved, in which case nothing
/// changed. Call this before opening any media.
pub fn set_binaries(ffmpeg: impl Into<PathBuf>, ffprobe: impl Into<PathBuf>) -> bool {
- let first = FFMPEG.set(ffmpeg.into()).is_ok();
- let second = FFPROBE.set(ffprobe.into()).is_ok();
- first && second
+ BINARIES.set((ffmpeg.into(), ffprobe.into())).is_ok()
+}
+
+fn resolved() -> &'static (PathBuf, PathBuf) {
+ BINARIES.get_or_init(|| (PathBuf::from("ffmpeg"), PathBuf::from("ffprobe")))
}
/// The `ffmpeg` binary to run. Defaults to whatever `PATH` finds.
pub fn ffmpeg() -> &'static Path {
- FFMPEG.get_or_init(|| PathBuf::from("ffmpeg"))
+ &resolved().0
}
/// The `ffprobe` binary to run. Defaults to whatever `PATH` finds.
pub fn ffprobe() -> &'static Path {
- FFPROBE.get_or_init(|| PathBuf::from("ffprobe"))
+ &resolved().1
}
#[cfg(test)]
diff --git a/engine/crates/relay-media/src/decode.rs b/engine/crates/relay-media/src/decode.rs
index 3655d9e0..12f9ad45 100644
--- a/engine/crates/relay-media/src/decode.rs
+++ b/engine/crates/relay-media/src/decode.rs
@@ -2,13 +2,14 @@
use std::io::Read;
use std::path::{Path, PathBuf};
-use std::process::{Child, ChildStdout, Command, Stdio};
+use std::process::{Child, ChildStdout, Stdio};
use relay_core::frame::Frame;
use relay_core::time::{FrameRate, Rational};
use crate::error::{Error, Result};
use crate::probe;
+use crate::process::{StderrTail, base_command};
/// Name used in error messages. The binary actually run comes from
/// [`crate::binaries::ffmpeg`], which may be a bundled copy.
@@ -109,13 +110,14 @@ impl DecodeOptions {
/// Decodes a file by piping raw RGBA out of an `ffmpeg` child process.
///
-/// The child's stderr is inherited rather than captured: reading two pipes from
-/// one process without deadlocking needs a second thread, and at `-loglevel
-/// error` the only thing it ever prints is the message you want to see anyway.
+/// The child's stderr is drained on its own thread and its tail is folded into
+/// [`Error::Exited`] - a packaged app has no terminal, so an inherited stderr
+/// would send the one useful line FFmpeg prints into the void.
pub struct FfmpegDecoder {
path: PathBuf,
child: Child,
stdout: ChildStdout,
+ stderr: StderrTail,
width: u32,
height: u32,
/// Reused between frames so decoding does not allocate per frame.
@@ -142,8 +144,7 @@ impl FfmpegDecoder {
}
};
- let mut command = Command::new(crate::binaries::ffmpeg());
- command.args(["-hide_banner", "-nostdin", "-loglevel", "error"]);
+ let mut command = base_command(crate::binaries::ffmpeg());
// Both of these are *input* options and have to precede -i.
if options.looping {
@@ -168,19 +169,23 @@ impl FfmpegDecoder {
}
command
- .args(["-f", "rawvideo", "-pix_fmt", "rgba", "-"])
+ // `pipe:1`, not `-`: the bare dash resolves to the `fd:` protocol
+ // on modern FFmpeg, which a trimmed bundled build may not include.
+ .args(["-f", "rawvideo", "-pix_fmt", "rgba", "pipe:1"])
.stdout(Stdio::piped())
.stdin(Stdio::null())
- .stderr(Stdio::inherit());
+ .stderr(Stdio::piped());
let mut child =
command.spawn().map_err(|source| Error::Spawn { program: FFMPEG, source })?;
let stdout = child.stdout.take().expect("stdout was piped");
+ let stderr = StderrTail::drain(&mut child);
Ok(Self {
path: path.to_path_buf(),
child,
stdout,
+ stderr,
width,
height,
buffer: vec![0u8; Frame::byte_len(width, height)],
@@ -205,7 +210,12 @@ impl FfmpegDecoder {
if status.success() {
Ok(())
} else {
- Err(Error::Exited { program: FFMPEG, path: self.path.clone(), status })
+ Err(Error::Exited {
+ program: FFMPEG,
+ path: self.path.clone(),
+ status,
+ stderr: self.stderr.summary(),
+ })
}
}
}
diff --git a/engine/crates/relay-media/src/encode.rs b/engine/crates/relay-media/src/encode.rs
index 9f3c78a3..d4653ea0 100644
--- a/engine/crates/relay-media/src/encode.rs
+++ b/engine/crates/relay-media/src/encode.rs
@@ -2,12 +2,13 @@
use std::io::Write;
use std::path::{Path, PathBuf};
-use std::process::{Child, ChildStdin, Command, Stdio};
+use std::process::{Child, ChildStdin, Stdio};
use relay_core::frame::Frame;
use relay_core::time::FrameRate;
use crate::error::{Error, Result};
+use crate::process::{StderrTail, base_command};
/// Name used in error messages. The binary actually run comes from
/// [`crate::binaries::ffmpeg`], which may be a bundled copy.
@@ -57,6 +58,7 @@ pub struct FfmpegEncoder {
child: Child,
/// Taken in `finish` - closing the pipe is what tells FFmpeg to stop.
stdin: Option<ChildStdin>,
+ stderr: StderrTail,
width: u32,
height: u32,
written: u64,
@@ -74,14 +76,17 @@ impl FfmpegEncoder {
let path = path.as_ref();
let fps = frame_rate.fps();
- let mut command = Command::new(crate::binaries::ffmpeg());
+ let mut command = base_command(crate::binaries::ffmpeg());
command
- .args(["-hide_banner", "-nostdin", "-loglevel", "error", "-y"])
+ .arg("-y")
// Input: what is coming down the pipe.
.args(["-f", "rawvideo", "-pix_fmt", "rgba"])
.args(["-s", &format!("{width}x{height}")])
.args(["-r", &format!("{}/{}", fps.numerator(), fps.denominator())])
- .args(["-i", "-"])
+ // `pipe:0`, not `-`: since FFmpeg 6 the bare dash resolves to the
+ // `fd:` protocol, which a trimmed build (like the one we bundle)
+ // may not include. The pipe protocol is what we actually mean.
+ .args(["-i", "pipe:0"])
// Output.
.args(["-c:v", &options.codec])
.args(["-preset", &options.preset])
@@ -91,13 +96,22 @@ impl FfmpegEncoder {
.arg(path)
.stdin(Stdio::piped())
.stdout(Stdio::null())
- .stderr(Stdio::inherit());
+ .stderr(Stdio::piped());
let mut child =
command.spawn().map_err(|source| Error::Spawn { program: FFMPEG, source })?;
let stdin = child.stdin.take().expect("stdin was piped");
-
- Ok(Self { path: path.to_path_buf(), child, stdin: Some(stdin), width, height, written: 0 })
+ let stderr = StderrTail::drain(&mut child);
+
+ Ok(Self {
+ path: path.to_path_buf(),
+ child,
+ stdin: Some(stdin),
+ stderr,
+ width,
+ height,
+ written: 0,
+ })
}
/// How many frames have been accepted so far.
@@ -126,9 +140,24 @@ impl FrameSink for FfmpegEncoder {
});
};
- stdin
- .write_all(frame.pixels())
- .map_err(|source| Error::Io { program: FFMPEG, source })?;
+ if let Err(source) = stdin.write_all(frame.pixels()) {
+ // A broken pipe means the encoder died; what it printed on the way
+ // out is the informative error, not the EPIPE it left behind.
+ if source.kind() == std::io::ErrorKind::BrokenPipe {
+ drop(self.stdin.take());
+ if let Ok(status) = self.child.wait()
+ && !status.success()
+ {
+ return Err(Error::Exited {
+ program: FFMPEG,
+ path: self.path.clone(),
+ status,
+ stderr: self.stderr.summary(),
+ });
+ }
+ }
+ return Err(Error::Io { program: FFMPEG, source });
+ }
self.written += 1;
Ok(())
}
@@ -141,7 +170,12 @@ impl FrameSink for FfmpegEncoder {
if status.success() {
Ok(())
} else {
- Err(Error::Exited { program: FFMPEG, path: self.path.clone(), status })
+ Err(Error::Exited {
+ program: FFMPEG,
+ path: self.path.clone(),
+ status,
+ stderr: self.stderr.summary(),
+ })
}
}
}
diff --git a/engine/crates/relay-media/src/error.rs b/engine/crates/relay-media/src/error.rs
index a63a371e..7858bf2a 100644
--- a/engine/crates/relay-media/src/error.rs
+++ b/engine/crates/relay-media/src/error.rs
@@ -23,7 +23,7 @@ pub enum Error {
},
/// The child process ran and exited unhappily.
- #[error("`{program}` exited with {status} while handling {path}")]
+ #[error("`{program}` exited with {status} while handling {path}: {stderr}")]
Exited {
/// Which binary failed.
program: &'static str,
@@ -31,6 +31,8 @@ pub enum Error {
path: PathBuf,
/// Its exit status.
status: ExitStatus,
+ /// The tail of what it printed - the actual reason, when there is one.
+ stderr: String,
},
/// An IO error moving bytes over the pipe.
@@ -43,6 +45,16 @@ pub enum Error {
source: std::io::Error,
},
+ /// A user-supplied filter chain would break out of its slot in a
+ /// filtergraph.
+ #[error("invalid filter chain {chain:?}: {detail}")]
+ InvalidFilterChain {
+ /// The chain as supplied.
+ chain: String,
+ /// What made it unacceptable.
+ detail: String,
+ },
+
/// `ffprobe` returned something we could not make sense of.
#[error("could not understand ffprobe output for {path}: {detail}")]
Probe {
diff --git a/engine/crates/relay-media/src/ffi.rs b/engine/crates/relay-media/src/ffi.rs
index 773c4386..fedd13d8 100644
--- a/engine/crates/relay-media/src/ffi.rs
+++ b/engine/crates/relay-media/src/ffi.rs
@@ -223,8 +223,19 @@ impl FfiDecoder {
/// rational, the timestamp is an integer count of those ticks, and
/// `relay-core` speaks rationals - so the value survives with no rounding
/// anywhere along the way.
- fn to_seconds(&self, ticks: i64) -> Rational {
- Rational::new(ticks, 1) * Rational::new(self.time_base.num as i64, self.time_base.den as i64)
+ ///
+ /// `None` when the container's numbers cannot form a representable value -
+ /// a degenerate time base, or a product that overflows. Both come straight
+ /// from an arbitrary file, so they must degrade to "position unknown"
+ /// rather than panic the process.
+ fn to_seconds(&self, ticks: i64) -> Option<Rational> {
+ if self.time_base.den == 0 {
+ return None;
+ }
+ Rational::checked_new(
+ i128::from(ticks) * i128::from(self.time_base.num),
+ i128::from(self.time_base.den),
+ )
}
/// Scales the decoded frame into a fresh RGBA buffer.
@@ -280,7 +291,8 @@ impl FrameSource for FfiDecoder {
if code == 0 {
// SAFETY: receive_frame succeeded, so the frame is populated.
let ticks = unsafe { (*self.decoded).best_effort_timestamp };
- self.position = (ticks != ffi::AV_NOPTS_VALUE).then(|| self.to_seconds(ticks));
+ self.position =
+ (ticks != ffi::AV_NOPTS_VALUE).then(|| self.to_seconds(ticks)).flatten();
return Ok(Some(self.convert()));
}
@@ -347,7 +359,18 @@ impl FrameSource for FfiDecoder {
impl SeekableSource for FfiDecoder {
fn seek(&mut self, to: Rational) -> Result<()> {
- // Convert seconds back into this stream's tick count.
+ // Convert seconds back into this stream's tick count. The time base
+ // comes from the file, so a degenerate one is an error, not a panic.
+ if self.time_base.num == 0 || self.time_base.den == 0 {
+ return Err(Error::Ffi {
+ operation: "seek time base",
+ path: self.path.clone(),
+ detail: format!(
+ "stream has a degenerate time base {}/{}",
+ self.time_base.num, self.time_base.den
+ ),
+ });
+ }
let ticks_per_second = Rational::new(self.time_base.den as i64, self.time_base.num as i64);
let target = (to * ticks_per_second).floor();
diff --git a/engine/crates/relay-media/src/lib.rs b/engine/crates/relay-media/src/lib.rs
index 93377dee..34f78d79 100644
--- a/engine/crates/relay-media/src/lib.rs
+++ b/engine/crates/relay-media/src/lib.rs
@@ -9,6 +9,7 @@
//! [`FrameSink`]. A future GPU-decode or FFI backend implements those two and
//! nothing else in the workspace changes.
+pub mod audio;
pub mod binaries;
pub mod decode;
pub mod encode;
@@ -17,6 +18,8 @@ pub mod ffi;
pub mod error;
pub mod probe;
+mod process;
+
pub use binaries::{ffmpeg, ffprobe, set_binaries};
pub use decode::{DecodeOptions, FfmpegDecoder, FrameSource, SeekableSource};
pub use encode::{EncodeOptions, FfmpegEncoder, FrameSink};
diff --git a/engine/crates/relay-media/src/probe.rs b/engine/crates/relay-media/src/probe.rs
index db70da57..a44fec7e 100644
--- a/engine/crates/relay-media/src/probe.rs
+++ b/engine/crates/relay-media/src/probe.rs
@@ -77,6 +77,7 @@ pub fn probe(path: impl AsRef<Path>) -> Result<MediaInfo> {
program: FFPROBE,
path: path.to_path_buf(),
status: output.status,
+ stderr: crate::process::summarize(&output.stderr),
});
}
diff --git a/engine/crates/relay-media/src/process.rs b/engine/crates/relay-media/src/process.rs
new file mode 100644
index 00000000..2565a838
--- /dev/null
+++ b/engine/crates/relay-media/src/process.rs
@@ -0,0 +1,132 @@
+//! Shared plumbing for the FFmpeg children this crate spawns.
+//!
+//! Every invocation goes through [`base_command`], and every long-lived child
+//! drains its stderr through [`StderrTail`]. The tail is why: a packaged app
+//! has no terminal, so an inherited stderr sends FFmpeg's one useful line into
+//! the void and leaves the user with "exited with status 1". Draining on a
+//! thread also means the pipe can never fill up and stall the child.
+
+use std::io::Read;
+use std::path::Path;
+use std::process::{Child, Command, Stdio};
+use std::sync::{Arc, Mutex};
+use std::thread::JoinHandle;
+
+use crate::error::{Error, Result};
+
+/// How much of the child's stderr to keep. At `-loglevel error` FFmpeg says
+/// little; this holds the message that matters plus its context.
+const STDERR_KEEP: usize = 8 * 1024;
+
+/// A command with the flags every invocation wants: no banner, no terminal
+/// interaction, errors only.
+pub(crate) fn base_command(binary: &Path) -> Command {
+ let mut command = Command::new(binary);
+ command.args(["-hide_banner", "-nostdin", "-loglevel", "error"]);
+ command
+}
+
+/// Collects a child's stderr on a drain thread, keeping the tail for error
+/// messages.
+pub(crate) struct StderrTail {
+ buffer: Arc<Mutex<Vec<u8>>>,
+ handle: Option<JoinHandle<()>>,
+}
+
+impl StderrTail {
+ /// Starts draining `child`'s stderr, which must have been spawned with
+ /// `Stdio::piped()`. A child whose stderr was not piped yields an empty
+ /// tail rather than an error.
+ pub(crate) fn drain(child: &mut Child) -> Self {
+ let buffer = Arc::new(Mutex::new(Vec::new()));
+ let handle = child.stderr.take().map(|mut stderr| {
+ let buffer = Arc::clone(&buffer);
+ std::thread::spawn(move || {
+ let mut chunk = [0u8; 4096];
+ loop {
+ match stderr.read(&mut chunk) {
+ Ok(0) => break,
+ Ok(read) => {
+ let mut buffer = buffer.lock().expect("stderr buffer poisoned");
+ buffer.extend_from_slice(&chunk[..read]);
+ let excess = buffer.len().saturating_sub(STDERR_KEEP);
+ if excess > 0 {
+ buffer.drain(..excess);
+ }
+ }
+ Err(_) => break,
+ }
+ }
+ })
+ });
+ Self { buffer, handle }
+ }
+
+ /// The last few lines the child printed, joined onto one line.
+ ///
+ /// Call only after the child has been waited on: EOF on the pipe is what
+ /// lets the drain thread finish, and joining it first is what makes the
+ /// buffer complete.
+ pub(crate) fn summary(&mut self) -> String {
+ if let Some(handle) = self.handle.take() {
+ let _ = handle.join();
+ }
+ let buffer = self.buffer.lock().expect("stderr buffer poisoned");
+ summarize(&buffer)
+ }
+}
+
+/// The last three non-empty lines, joined onto one. What an error message has
+/// room for, and with `-loglevel error` usually the whole story.
+pub(crate) fn summarize(stderr: &[u8]) -> String {
+ let text = String::from_utf8_lossy(stderr);
+ let mut lines: Vec<&str> = text.lines().map(str::trim).filter(|line| !line.is_empty()).collect();
+ let tail = lines.split_off(lines.len().saturating_sub(3));
+ if tail.is_empty() {
+ "no error output captured".to_owned()
+ } else {
+ tail.join(" / ")
+ }
+}
+
+/// Runs a prepared command to completion, capturing stderr, and turns a
+/// non-zero exit into [`Error::Exited`] that carries what the child said.
+pub(crate) fn run_to_completion(
+ command: &mut Command,
+ program: &'static str,
+ path: &Path,
+) -> Result<()> {
+ let output = command
+ .stdin(Stdio::null())
+ .stdout(Stdio::null())
+ .stderr(Stdio::piped())
+ .output()
+ .map_err(|source| Error::Spawn { program, source })?;
+
+ if output.status.success() {
+ return Ok(());
+ }
+ Err(Error::Exited {
+ program,
+ path: path.to_path_buf(),
+ status: output.status,
+ stderr: summarize(&output.stderr),
+ })
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn summarize_keeps_the_last_three_lines() {
+ let text = b"one\ntwo\n\nthree\nfour\n";
+ assert_eq!(summarize(text), "two / three / four");
+ }
+
+ #[test]
+ fn summarize_of_nothing_says_so() {
+ assert_eq!(summarize(b""), "no error output captured");
+ assert_eq!(summarize(b"\n \n"), "no error output captured");
+ }
+}
diff --git a/engine/crates/relay-render/Cargo.toml b/engine/crates/relay-render/Cargo.toml
index 6446ae3f..675befab 100644
--- a/engine/crates/relay-render/Cargo.toml
+++ b/engine/crates/relay-render/Cargo.toml
@@ -5,8 +5,15 @@ edition.workspace = true
rust-version.workspace = true
description = "Turning a timeline plus a timestamp into one finished frame."
+[features]
+# The wgpu compositor. Off by default so the engine stays light to build; the
+# desktop app turns it on.
+gpu = ["dep:wgpu", "dep:pollster"]
+
[dependencies]
relay-core.workspace = true
+wgpu = { workspace = true, optional = true }
+pollster = { workspace = true, optional = true }
[lints]
workspace = true
diff --git a/engine/crates/relay-render/src/compositor.rs b/engine/crates/relay-render/src/compositor.rs
index 6bf2a420..193bda59 100644
--- a/engine/crates/relay-render/src/compositor.rs
+++ b/engine/crates/relay-render/src/compositor.rs
@@ -19,8 +19,9 @@ pub struct Placement {
pub scale: f32,
/// Clockwise rotation about the layer's centre, in radians.
pub rotation: f32,
- /// Offset of the layer's centre from its base position, in pixels.
+ /// Horizontal offset of the layer's centre from its base position, pixels.
pub translate_x: f32,
+ /// Vertical offset of the layer's centre from its base position, pixels.
pub translate_y: f32,
}
diff --git a/engine/crates/relay-render/src/gpu.rs b/engine/crates/relay-render/src/gpu.rs
new file mode 100644
index 00000000..ae711b5a
--- /dev/null
+++ b/engine/crates/relay-render/src/gpu.rs
@@ -0,0 +1,607 @@
+//! The wgpu compositor.
+//!
+//! The second implementation of [`Compositor`](crate::Compositor), as decision
+//! 0004 planned: [`CpuCompositor`](crate::CpuCompositor) stays the reference,
+//! and this one exists to be fast. Layers are uploaded as textures, drawn as
+//! transformed quads into an offscreen target, and read back as a [`Frame`].
+//!
+//! Deliberate parity choices, so the two backends can be diffed:
+//!
+//! - The target format is `Rgba8Unorm`, *not* the sRGB variant. Blending
+//! therefore happens on stored (gamma-encoded) values, exactly as the CPU
+//! path does. When the day comes to blend in linear light, both backends
+//! change together.
+//! - Layer quads are sampled bilinearly with clamp-to-edge, matching the CPU
+//! path's bilinear inverse mapping.
+//!
+//! Construction is fallible: a machine with no usable adapter gets `None`, and
+//! callers fall back to the CPU. Never panic over a missing GPU.
+
+use std::collections::HashMap;
+
+use relay_core::frame::Frame;
+
+use crate::compositor::{Compositor, Layer};
+
+/// Bytes per row must be a multiple of this for a texture-to-buffer copy.
+const ROW_ALIGN: usize = wgpu::COPY_BYTES_PER_ROW_ALIGNMENT as usize;
+
+/// One vertex of a layer quad: clip-space position, texel coordinates, and
+/// the layer's opacity riding along so no uniforms are needed.
+#[repr(C)]
+#[derive(Clone, Copy)]
+struct Vertex {
+ position: [f32; 2],
+ uv: [f32; 2],
+ opacity: f32,
+}
+
+/// Vertex data as raw bytes. `Vertex` is `repr(C)` and all `f32`, so its byte
+/// representation is well-defined; this avoids pulling in bytemuck.
+fn as_bytes(vertices: &[Vertex]) -> &[u8] {
+ // SAFETY: Vertex is repr(C) with only f32 fields - no padding, no
+ // invalid bit patterns, alignment of u8 is 1.
+ unsafe {
+ std::slice::from_raw_parts(
+ vertices.as_ptr().cast::<u8>(),
+ std::mem::size_of_val(vertices),
+ )
+ }
+}
+
+const SHADER: &str = r#"
+struct VsIn {
+ @location(0) position: vec2<f32>,
+ @location(1) uv: vec2<f32>,
+ @location(2) opacity: f32,
+}
+
+struct VsOut {
+ @builtin(position) position: vec4<f32>,
+ @location(0) uv: vec2<f32>,
+ @location(1) opacity: f32,
+}
+
+@vertex
+fn vs_main(in: VsIn) -> VsOut {
+ var out: VsOut;
+ out.position = vec4<f32>(in.position, 0.0, 1.0);
+ out.uv = in.uv;
+ out.opacity = in.opacity;
+ return out;
+}
+
+@group(0) @binding(0) var layer_texture: texture_2d<f32>;
+@group(0) @binding(1) var layer_sampler: sampler;
+
+@fragment
+fn fs_main(in: VsOut) -> @location(0) vec4<f32> {
+ let colour = textureSample(layer_texture, layer_sampler, in.uv);
+ let alpha = colour.a * in.opacity;
+ // Premultiplied output; the pipeline blends ONE / ONE_MINUS_SRC_ALPHA,
+ // which together is the same source-over the CPU path computes.
+ return vec4<f32>(colour.rgb * alpha, alpha);
+}
+"#;
+
+/// A cached layer texture and its bind group, reusable for any layer of the
+/// same size.
+struct PooledTexture {
+ texture: wgpu::Texture,
+ bind_group: wgpu::BindGroup,
+}
+
+/// The reusable output target and its readback buffer, for one output size.
+struct Target {
+ width: u32,
+ height: u32,
+ texture: wgpu::Texture,
+ staging: wgpu::Buffer,
+ padded_row: usize,
+}
+
+/// A compositor that draws on the GPU. See the module docs.
+pub struct WgpuCompositor {
+ device: wgpu::Device,
+ queue: wgpu::Queue,
+ pipeline: wgpu::RenderPipeline,
+ bind_layout: wgpu::BindGroupLayout,
+ sampler: wgpu::Sampler,
+ vertices: wgpu::Buffer,
+ vertex_capacity: usize,
+ /// Layer textures pooled by size; `used` counts how many of a size this
+ /// frame has claimed, and resets every composite.
+ pool: HashMap<(u32, u32), Vec<PooledTexture>>,
+ used: HashMap<(u32, u32), usize>,
+ target: Option<Target>,
+}
+
+impl WgpuCompositor {
+ /// Builds a compositor on the best available adapter, or `None` when the
+ /// machine has nothing usable - callers fall back to the CPU path.
+ pub fn new() -> Option<Self> {
+ let instance =
+ wgpu::Instance::new(wgpu::InstanceDescriptor::new_without_display_handle());
+ let adapter = pollster::block_on(instance.request_adapter(&wgpu::RequestAdapterOptions {
+ power_preference: wgpu::PowerPreference::HighPerformance,
+ ..Default::default()
+ }))
+ .ok()?;
+ let (device, queue) =
+ pollster::block_on(adapter.request_device(&wgpu::DeviceDescriptor::default())).ok()?;
+
+ let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
+ label: Some("relay compositor"),
+ source: wgpu::ShaderSource::Wgsl(SHADER.into()),
+ });
+
+ let bind_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
+ label: Some("relay layer"),
+ entries: &[
+ wgpu::BindGroupLayoutEntry {
+ binding: 0,
+ visibility: wgpu::ShaderStages::FRAGMENT,
+ ty: wgpu::BindingType::Texture {
+ sample_type: wgpu::TextureSampleType::Float { filterable: true },
+ view_dimension: wgpu::TextureViewDimension::D2,
+ multisampled: false,
+ },
+ count: None,
+ },
+ wgpu::BindGroupLayoutEntry {
+ binding: 1,
+ visibility: wgpu::ShaderStages::FRAGMENT,
+ ty: wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering),
+ count: None,
+ },
+ ],
+ });
+
+ let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
+ label: Some("relay compositor"),
+ bind_group_layouts: &[Some(&bind_layout)],
+ immediate_size: 0,
+ });
+
+ let vertex_layout = wgpu::VertexBufferLayout {
+ array_stride: std::mem::size_of::<Vertex>() as u64,
+ step_mode: wgpu::VertexStepMode::Vertex,
+ attributes: &wgpu::vertex_attr_array![0 => Float32x2, 1 => Float32x2, 2 => Float32],
+ };
+
+ // ONE / ONE_MINUS_SRC_ALPHA over premultiplied shader output is
+ // source-over. Alpha accumulates the same way; the readback forces the
+ // final frame opaque regardless.
+ let blend = wgpu::BlendState {
+ color: wgpu::BlendComponent {
+ src_factor: wgpu::BlendFactor::One,
+ dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
+ operation: wgpu::BlendOperation::Add,
+ },
+ alpha: wgpu::BlendComponent {
+ src_factor: wgpu::BlendFactor::One,
+ dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
+ operation: wgpu::BlendOperation::Add,
+ },
+ };
+
+ let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
+ label: Some("relay compositor"),
+ layout: Some(&pipeline_layout),
+ vertex: wgpu::VertexState {
+ module: &shader,
+ entry_point: Some("vs_main"),
+ compilation_options: Default::default(),
+ buffers: &[Some(vertex_layout)],
+ },
+ fragment: Some(wgpu::FragmentState {
+ module: &shader,
+ entry_point: Some("fs_main"),
+ compilation_options: Default::default(),
+ targets: &[Some(wgpu::ColorTargetState {
+ format: wgpu::TextureFormat::Rgba8Unorm,
+ blend: Some(blend),
+ write_mask: wgpu::ColorWrites::ALL,
+ })],
+ }),
+ primitive: wgpu::PrimitiveState::default(),
+ depth_stencil: None,
+ multisample: wgpu::MultisampleState::default(),
+ multiview_mask: None,
+ cache: None,
+ });
+
+ let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
+ label: Some("relay layer"),
+ address_mode_u: wgpu::AddressMode::ClampToEdge,
+ address_mode_v: wgpu::AddressMode::ClampToEdge,
+ mag_filter: wgpu::FilterMode::Linear,
+ min_filter: wgpu::FilterMode::Linear,
+ ..Default::default()
+ });
+
+ let vertices = device.create_buffer(&wgpu::BufferDescriptor {
+ label: Some("relay quads"),
+ size: (std::mem::size_of::<Vertex>() * 6 * 8) as u64,
+ usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST,
+ mapped_at_creation: false,
+ });
+
+ Some(Self {
+ device,
+ queue,
+ pipeline,
+ bind_layout,
+ sampler,
+ vertices,
+ vertex_capacity: 6 * 8,
+ pool: HashMap::new(),
+ used: HashMap::new(),
+ target: None,
+ })
+ }
+
+ /// The reusable render target for this output size.
+ fn target(&mut self, width: u32, height: u32) -> &Target {
+ let stale = self
+ .target
+ .as_ref()
+ .is_none_or(|target| target.width != width || target.height != height);
+ if stale {
+ let texture = self.device.create_texture(&wgpu::TextureDescriptor {
+ label: Some("relay output"),
+ size: wgpu::Extent3d { width, height, depth_or_array_layers: 1 },
+ mip_level_count: 1,
+ sample_count: 1,
+ dimension: wgpu::TextureDimension::D2,
+ format: wgpu::TextureFormat::Rgba8Unorm,
+ usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::COPY_SRC,
+ view_formats: &[],
+ });
+ let padded_row = (width as usize * 4).div_ceil(ROW_ALIGN) * ROW_ALIGN;
+ let staging = self.device.create_buffer(&wgpu::BufferDescriptor {
+ label: Some("relay readback"),
+ size: (padded_row * height as usize) as u64,
+ usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ,
+ mapped_at_creation: false,
+ });
+ self.target = Some(Target { width, height, texture, staging, padded_row });
+ }
+ self.target.as_ref().expect("just ensured")
+ }
+
+ /// Claims a pooled texture of the layer's size, uploading its pixels.
+ fn upload(&mut self, frame: &Frame) -> usize {
+ let key = (frame.width(), frame.height());
+ let used = self.used.entry(key).or_insert(0);
+ let pool = self.pool.entry(key).or_default();
+
+ if *used == pool.len() {
+ let texture = self.device.create_texture(&wgpu::TextureDescriptor {
+ label: Some("relay layer"),
+ size: wgpu::Extent3d {
+ width: frame.width(),
+ height: frame.height(),
+ depth_or_array_layers: 1,
+ },
+ mip_level_count: 1,
+ sample_count: 1,
+ dimension: wgpu::TextureDimension::D2,
+ format: wgpu::TextureFormat::Rgba8Unorm,
+ usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST,
+ view_formats: &[],
+ });
+ let view = texture.create_view(&wgpu::TextureViewDescriptor::default());
+ let bind_group = self.device.create_bind_group(&wgpu::BindGroupDescriptor {
+ label: Some("relay layer"),
+ layout: &self.bind_layout,
+ entries: &[
+ wgpu::BindGroupEntry {
+ binding: 0,
+ resource: wgpu::BindingResource::TextureView(&view),
+ },
+ wgpu::BindGroupEntry {
+ binding: 1,
+ resource: wgpu::BindingResource::Sampler(&self.sampler),
+ },
+ ],
+ });
+ pool.push(PooledTexture { texture, bind_group });
+ }
+
+ let index = *used;
+ *used += 1;
+
+ self.queue.write_texture(
+ wgpu::TexelCopyTextureInfo {
+ texture: &pool[index].texture,
+ mip_level: 0,
+ origin: wgpu::Origin3d::ZERO,
+ aspect: wgpu::TextureAspect::All,
+ },
+ frame.pixels(),
+ wgpu::TexelCopyBufferLayout {
+ offset: 0,
+ bytes_per_row: Some(frame.width() * 4),
+ rows_per_image: Some(frame.height()),
+ },
+ wgpu::Extent3d {
+ width: frame.width(),
+ height: frame.height(),
+ depth_or_array_layers: 1,
+ },
+ );
+
+ index
+ }
+
+ /// The six vertices of one layer's quad, transformed the same way the CPU
+ /// path's inverse map is derived: scale, then clockwise rotation, about
+ /// the layer's centre, then translation.
+ fn quad(layer: &Layer<'_>, out_width: u32, out_height: u32) -> [Vertex; 6] {
+ let placement = layer.placement;
+ let width = layer.frame.width() as f32;
+ let height = layer.frame.height() as f32;
+
+ let centre_x = layer.x as f32 + width / 2.0 + placement.translate_x;
+ let centre_y = layer.y as f32 + height / 2.0 + placement.translate_y;
+ let (sin, cos) = placement.rotation.sin_cos();
+ let scale = placement.scale.max(1e-6);
+
+ let corner = |sx: f32, sy: f32, u: f32, v: f32| {
+ // Source-space offset from centre, scaled, then rotated clockwise
+ // in y-down coordinates - the forward form of the CPU inverse map.
+ let dx = sx * width / 2.0 * scale;
+ let dy = sy * height / 2.0 * scale;
+ let px = centre_x + dx * cos - dy * sin;
+ let py = centre_y + dx * sin + dy * cos;
+ Vertex {
+ position: [
+ px / out_width as f32 * 2.0 - 1.0,
+ 1.0 - py / out_height as f32 * 2.0,
+ ],
+ uv: [u, v],
+ opacity: layer.opacity.clamp(0.0, 1.0),
+ }
+ };
+
+ let top_left = corner(-1.0, -1.0, 0.0, 0.0);
+ let top_right = corner(1.0, -1.0, 1.0, 0.0);
+ let bottom_left = corner(-1.0, 1.0, 0.0, 1.0);
+ let bottom_right = corner(1.0, 1.0, 1.0, 1.0);
+ [top_left, top_right, bottom_left, top_right, bottom_right, bottom_left]
+ }
+
+ /// Copies the rendered target back into a [`Frame`], forcing it opaque.
+ fn read_back(&mut self) -> Frame {
+ let target = self.target.as_ref().expect("composite rendered first");
+ let (width, height, padded_row) = (target.width, target.height, target.padded_row);
+
+ let slice = target.staging.slice(..);
+ slice.map_async(wgpu::MapMode::Read, |_| {});
+ let _ = self.device.poll(wgpu::PollType::wait_indefinitely());
+
+ let mut frame = Frame::transparent(width, height);
+ {
+ let data = slice.get_mapped_range().expect("buffer mapped after wait");
+ let row_bytes = width as usize * 4;
+ let pixels = frame.pixels_mut();
+ for row in 0..height as usize {
+ let from = &data[row * padded_row..row * padded_row + row_bytes];
+ pixels[row * row_bytes..(row + 1) * row_bytes].copy_from_slice(from);
+ }
+ // The output goes to a screen or an encoder; neither has anything
+ // to show through, and blending may have left alpha short of one.
+ for pixel in pixels.chunks_exact_mut(4) {
+ pixel[3] = 255;
+ }
+ }
+ target.staging.unmap();
+ frame
+ }
+}
+
+impl Compositor for WgpuCompositor {
+ fn composite(&mut self, width: u32, height: u32, layers: &[Layer<'_>]) -> Frame {
+ self.used.values_mut().for_each(|used| *used = 0);
+
+ // Upload every visible layer and build its quad.
+ let mut draws: Vec<(u32, u32, usize)> = Vec::with_capacity(layers.len());
+ let mut vertices: Vec<Vertex> = Vec::with_capacity(layers.len() * 6);
+ for layer in layers {
+ if layer.opacity <= 0.0 {
+ continue;
+ }
+ let index = self.upload(layer.frame);
+ draws.push((layer.frame.width(), layer.frame.height(), index));
+ vertices.extend_from_slice(&Self::quad(layer, width, height));
+ }
+
+ if vertices.len() > self.vertex_capacity {
+ self.vertex_capacity = vertices.len().next_power_of_two();
+ self.vertices = self.device.create_buffer(&wgpu::BufferDescriptor {
+ label: Some("relay quads"),
+ size: (std::mem::size_of::<Vertex>() * self.vertex_capacity) as u64,
+ usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST,
+ mapped_at_creation: false,
+ });
+ }
+ if !vertices.is_empty() {
+ self.queue.write_buffer(&self.vertices, 0, as_bytes(&vertices));
+ }
+
+ self.target(width, height);
+ let target = self.target.as_ref().expect("just ensured");
+ let view = target.texture.create_view(&wgpu::TextureViewDescriptor::default());
+
+ let mut encoder =
+ self.device.create_command_encoder(&wgpu::CommandEncoderDescriptor {
+ label: Some("relay composite"),
+ });
+ {
+ let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
+ label: Some("relay composite"),
+ color_attachments: &[Some(wgpu::RenderPassColorAttachment {
+ view: &view,
+ depth_slice: None,
+ resolve_target: None,
+ ops: wgpu::Operations {
+ load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
+ store: wgpu::StoreOp::Store,
+ },
+ })],
+ depth_stencil_attachment: None,
+ timestamp_writes: None,
+ occlusion_query_set: None,
+ multiview_mask: None,
+ });
+ pass.set_pipeline(&self.pipeline);
+ pass.set_vertex_buffer(0, self.vertices.slice(..));
+ for (draw, (layer_width, layer_height, pooled)) in draws.iter().enumerate() {
+ let bind_group =
+ &self.pool[&(*layer_width, *layer_height)][*pooled].bind_group;
+ pass.set_bind_group(0, bind_group, &[]);
+ let first = (draw * 6) as u32;
+ pass.draw(first..first + 6, 0..1);
+ }
+ }
+
+ encoder.copy_texture_to_buffer(
+ wgpu::TexelCopyTextureInfo {
+ texture: &target.texture,
+ mip_level: 0,
+ origin: wgpu::Origin3d::ZERO,
+ aspect: wgpu::TextureAspect::All,
+ },
+ wgpu::TexelCopyBufferInfo {
+ buffer: &target.staging,
+ layout: wgpu::TexelCopyBufferLayout {
+ offset: 0,
+ bytes_per_row: Some(target.padded_row as u32),
+ rows_per_image: Some(height),
+ },
+ },
+ wgpu::Extent3d { width, height, depth_or_array_layers: 1 },
+ );
+
+ self.queue.submit([encoder.finish()]);
+ self.read_back()
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use crate::CpuCompositor;
+ use crate::compositor::Placement;
+
+ fn gpu() -> Option<WgpuCompositor> {
+ let compositor = WgpuCompositor::new();
+ if compositor.is_none() {
+ eprintln!("no usable GPU adapter; skipping");
+ }
+ compositor
+ }
+
+ fn solid(width: u32, height: u32, rgba: [u8; 4]) -> Frame {
+ let mut frame = Frame::transparent(width, height);
+ frame.fill(rgba);
+ frame
+ }
+
+ /// Both backends composite the same layers; every pixel must agree within
+ /// `tolerance` per channel. The CPU path is the reference.
+ fn assert_matches_cpu(width: u32, height: u32, layers: &[Layer<'_>], tolerance: i32) {
+ let Some(mut gpu) = gpu() else { return };
+ let expected = CpuCompositor.composite(width, height, layers);
+ let actual = gpu.composite(width, height, layers);
+
+ for y in 0..height {
+ for x in 0..width {
+ let want = expected.pixel(x, y).expect("in bounds");
+ let got = actual.pixel(x, y).expect("in bounds");
+ for channel in 0..4 {
+ let difference = (i32::from(want[channel]) - i32::from(got[channel])).abs();
+ assert!(
+ difference <= tolerance,
+ "({x},{y}) channel {channel}: cpu {want:?} vs gpu {got:?}",
+ );
+ }
+ }
+ }
+ }
+
+ #[test]
+ fn empty_output_is_opaque_black() {
+ let Some(mut gpu) = gpu() else { return };
+ let frame = gpu.composite(4, 4, &[]);
+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 0, 255]));
+ assert_eq!(frame.pixel(3, 3), Some([0, 0, 0, 255]));
+ }
+
+ #[test]
+ fn plain_layers_match_the_cpu_reference() {
+ let red = solid(4, 4, [255, 0, 0, 255]);
+ let blue = solid(2, 2, [0, 0, 255, 255]);
+ let layers = [Layer::new(&red), Layer::new(&blue).at(1, 1)];
+ assert_matches_cpu(4, 4, &layers, 1);
+ }
+
+ #[test]
+ fn opacity_blending_matches_the_cpu_reference() {
+ let white = solid(4, 4, [255, 255, 255, 255]);
+ let half_alpha = solid(4, 4, [40, 200, 90, 128]);
+ let layers = [
+ Layer::new(&white).with_opacity(0.5),
+ Layer::new(&half_alpha).with_opacity(0.7),
+ ];
+ assert_matches_cpu(4, 4, &layers, 2);
+ }
+
+ #[test]
+ fn offset_layers_clip_like_the_cpu_reference() {
+ let red = solid(4, 4, [255, 0, 0, 255]);
+ let layers = [Layer::new(&red).at(-2, 3)];
+ assert_matches_cpu(6, 6, &layers, 1);
+ }
+
+ #[test]
+ fn scaling_matches_the_cpu_reference_away_from_edges() {
+ let Some(mut gpu) = gpu() else { return };
+ let red = solid(4, 4, [255, 0, 0, 255]);
+ let placement = Placement { scale: 2.0, ..Placement::IDENTITY };
+ let layers = [Layer::new(&red).at(2, 2).with_placement(placement)];
+
+ // Interior pixels are unambiguous; the half-pixel border where the two
+ // backends rasterise differently is not asserted.
+ let frame = gpu.composite(8, 8, &layers);
+ for (x, y) in [(1, 1), (4, 4), (6, 6)] {
+ assert_eq!(frame.pixel(x, y), Some([255, 0, 0, 255]), "at ({x},{y})");
+ }
+ assert_eq!(CpuCompositor.composite(8, 8, &layers).pixel(4, 4), Some([255, 0, 0, 255]));
+ }
+
+ #[test]
+ fn a_half_turn_swaps_the_ends() {
+ let Some(mut gpu) = gpu() else { return };
+ let mut strip = Frame::transparent(2, 1);
+ strip.set_pixel(0, 0, [255, 0, 0, 255]);
+ strip.set_pixel(1, 0, [0, 0, 255, 255]);
+ let placement = Placement { rotation: std::f32::consts::PI, ..Placement::IDENTITY };
+ let frame = gpu.composite(2, 1, &[Layer::new(&strip).with_placement(placement)]);
+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 255, 255]));
+ assert_eq!(frame.pixel(1, 0), Some([255, 0, 0, 255]));
+ }
+
+ #[test]
+ fn output_size_changes_are_handled() {
+ let Some(mut gpu) = gpu() else { return };
+ let red = solid(2, 2, [255, 0, 0, 255]);
+ // 3 wide: an unpadded row is 12 bytes, so this exercises row padding.
+ let small = gpu.composite(3, 2, &[Layer::new(&red)]);
+ assert_eq!(small.pixel(1, 1), Some([255, 0, 0, 255]));
+ let large = gpu.composite(16, 8, &[Layer::new(&red).at(14, 6)]);
+ assert_eq!(large.pixel(15, 7), Some([255, 0, 0, 255]));
+ assert_eq!(large.pixel(0, 0), Some([0, 0, 0, 255]));
+ }
+}
diff --git a/engine/crates/relay-render/src/lib.rs b/engine/crates/relay-render/src/lib.rs
index 4a7408b1..551ecba3 100644
--- a/engine/crates/relay-render/src/lib.rs
+++ b/engine/crates/relay-render/src/lib.rs
@@ -11,7 +11,11 @@
//! `docs/decisions/0004-cpu-compositor-first.md`.
pub mod compositor;
+#[cfg(feature = "gpu")]
+pub mod gpu;
pub mod plan;
pub use compositor::{Compositor, CpuCompositor, Layer, Placement};
+#[cfg(feature = "gpu")]
+pub use gpu::WgpuCompositor;
pub use plan::{FramePlan, PlannedLayer, plan_frame};
diff --git a/engine/crates/relay-render/src/plan.rs b/engine/crates/relay-render/src/plan.rs
index da5c92f3..1ba86e2d 100644
--- a/engine/crates/relay-render/src/plan.rs
+++ b/engine/crates/relay-render/src/plan.rs
@@ -22,6 +22,10 @@ pub struct PlannedLayer {
pub media: PathBuf,
/// The timestamp *within that file* to pull.
pub source_time: Rational,
+ /// Source seconds consumed per timeline second. A decoder that pulls one
+ /// frame per output frame must decode at `output_rate / speed` to stay in
+ /// step with `source_time`.
+ pub speed: Rational,
/// Blend strength over everything beneath, in `0.0..=1.0`.
pub opacity: f32,
/// The clip's placement in the frame, resolution-independent.
@@ -74,6 +78,7 @@ pub fn plan_frame(timeline: &Timeline, time: Rational) -> FramePlan {
clip: clip_id,
media: clip.media.path.clone(),
source_time,
+ speed: clip.speed,
opacity: clip.opacity.clamp(0.0, 1.0),
transform: clip.transform,
});
@@ -123,6 +128,19 @@ mod tests {
assert_eq!(plan.layers[0].source_time, seconds(32), "2s into a clip that starts at 30s");
}
+ #[test]
+ fn a_retimed_clip_plans_scaled_source_times() {
+ let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);
+ let track = timeline.add_track(Track::new("V1", TrackKind::Video));
+ let mut clip = Clip::new(MediaRef::new("a.mp4"), seconds(0), seconds(4));
+ clip.speed = Rational::from_int(2);
+ timeline.add_clip(track, clip).expect("track exists");
+
+ let plan = plan_frame(&timeline, seconds(3));
+ assert_eq!(plan.layers[0].source_time, seconds(6), "3s in at 2x is 6s of source");
+ assert_eq!(plan.layers[0].speed, Rational::from_int(2));
+ }
+
#[test]
fn a_gap_plans_to_nothing() {
let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);
diff --git a/website/.gitignore b/website/.gitignore
new file mode 100644
index 00000000..a547bf36
--- /dev/null
+++ b/website/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/website/.oxlintrc.json b/website/.oxlintrc.json
new file mode 100644
index 00000000..6fa991da
--- /dev/null
+++ b/website/.oxlintrc.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "plugins": ["react", "typescript", "oxc"],
+ "rules": {
+ "react/rules-of-hooks": "error",
+ "react/only-export-components": ["warn", { "allowConstantExport": true }]
+ }
+}
diff --git a/website/README.md b/website/README.md
new file mode 100644
index 00000000..d6af7e39
--- /dev/null
+++ b/website/README.md
@@ -0,0 +1,32 @@
+# React + TypeScript + Vite
+
+This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
+
+Currently, two official plugins are available:
+
+- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
+- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
+
+## React Compiler
+
+The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
+
+## Expanding the Oxlint configuration
+
+If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:
+
+```json
+{
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "plugins": ["react", "typescript", "oxc"],
+ "options": {
+ "typeAware": true
+ },
+ "rules": {
+ "react/rules-of-hooks": "error",
+ "react/only-export-components": ["warn", { "allowConstantExport": true }]
+ }
+}
+```
+
+See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.
diff --git a/website/index.html b/website/index.html
new file mode 100644
index 00000000..318398f7
--- /dev/null
+++ b/website/index.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link rel="icon" type="image/png" href="/wolfcut.png" />
+ <title>WolfCut — The free, open-source CapCut replacement</title>
+ <meta
+ name="description"
+ content="WolfCut is everything you use CapCut for — without the watermarks, paywalls, or subscriptions. A native Rust engine, a clean editor, and it all runs on your machine."
+ />
+ </head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="/src/main.tsx"></script>
+ </body>
+</html>
diff --git a/website/package-lock.json b/website/package-lock.json
new file mode 100644
index 00000000..56fd6e92
--- /dev/null
+++ b/website/package-lock.json
@@ -0,0 +1,1942 @@
+{
+ "name": "website",
+ "version": "0.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "website",
+ "version": "0.0.0",
+ "dependencies": {
+ "@tailwindcss/vite": "^4.3.3",
+ "react": "^19.2.8",
+ "react-dom": "^19.2.8",
+ "tailwindcss": "^4.3.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.13.3",
+ "@types/react": "^19.2.18",
+ "@types/react-dom": "^19.2.4",
+ "@vitejs/plugin-react": "^6.1.0",
+ "oxlint": "^1.79.0",
+ "typescript": "~6.0.2",
+ "vite": "^8.2.2"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.31",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@oxc-project/types": {
+ "version": "0.147.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.147.0.tgz",
+ "integrity": "sha512-IJ3s6ltHLp45S0bh7phkX+gJO7A1Wuz2EaqpAhb8WjqDwbzMiWKHhyyT42tskaWjEYXtHtVCPpnBJVT9+dcRLg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/Boshen"
+ }
+ },
+ "node_modules/@oxlint/binding-android-arm-eabi": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.80.0.tgz",
+ "integrity": "sha512-RM3Plj+biQpxa5d1GOOX6ciDlcUROmm4OZ/pLTpitkQt2mJv4jhtY4cbgaetOm5UKWZe05/TGQ6o1Vl8EOHkrA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-android-arm64": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.80.0.tgz",
+ "integrity": "sha512-YlO5JEf0Yr2bUUlu8O8daVcUxtcGGbcSmyV7E7nSbJbfAdxTE0PFPwgnIlw7wXJaTYjb+qs5hI5q3jxUkI7cAw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-darwin-arm64": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.80.0.tgz",
+ "integrity": "sha512-BULDOyO3AhsmdWfQeIUCykDt3dd7XZBGLhp1eIh56skRv01O+cNjNPwXMIbeW1x4+pxcln5if72wcRgViVo7PA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-darwin-x64": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.80.0.tgz",
+ "integrity": "sha512-YJ4JzLw7N5TDSQFlA0hAQGHvnDZgyypm1yunObVWcWiF9KM7eGCJKYKLgTC2Fi/57OdnBhbj4OkzPGdFQJ6HyA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-freebsd-x64": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.80.0.tgz",
+ "integrity": "sha512-AYUIk5QnL0s8oWAYsREZwkRYy1SupJTXALo93J1TgzHywxQtdM99FecRMQ87MXEdPQ0j1TmEpeeq3fGNkpvMqg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-arm-gnueabihf": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.80.0.tgz",
+ "integrity": "sha512-9hBZVANupQ89W9dXyE0n8doCyaW5pDyGn3y6XlIMPZ+rIKuyqkr3SNUXmVJIhuvUq0NBU3RBiSXXE69l4XI6KA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-arm-musleabihf": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.80.0.tgz",
+ "integrity": "sha512-SvS2uKqzY+pbfuvAHzH4338R6Zwo805GAwrIMVvK1KxoOWCIjZUdfzTCvilD7z6JK91v011+zYMryabhDo2AsQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-arm64-gnu": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.80.0.tgz",
+ "integrity": "sha512-tCLadyqRVL3pQTRPNg7cjXKvcvS4fbyXeQHhKk5BTJ1oftQln5/yIIWbu/Xom/DX41zv2P9QGt6+D/TtQVtY3A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-arm64-musl": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.80.0.tgz",
+ "integrity": "sha512-XfpCNRlOPcLlJl4Bn/FUhjqlR6BVavEykERBf/MV7YA9VZDa5g5znVqYhyviMafcxS9Pe/i/kPvHNO0U6svEHQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-ppc64-gnu": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.80.0.tgz",
+ "integrity": "sha512-3I4yMwcFG9NeO8ioY6JBBuKsIm5GL/x7MATt1S4tVWaxPu5HcJ+XnLUbcVBTxG8q2Wu56HSj+NmXQiVYb1lp6A==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-riscv64-gnu": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.80.0.tgz",
+ "integrity": "sha512-E1wAKymkpe1/E8helzBKdm81OBOF+ezxRyXRMEuik3ZpWDER5CPOKZwF66RsdwW98uwZv8UTFremUQtC1CzdJA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-riscv64-musl": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.80.0.tgz",
+ "integrity": "sha512-+gLRGD4sIo3+VA++iham5UxD9tKSoJ/VOrROCEXIcknrYtQg6iIQgvjN0cpiRF7N6UYC7pJbvHJlDnMge5LRpQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-s390x-gnu": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.80.0.tgz",
+ "integrity": "sha512-aR0PrzHj9leW3NmzBAAP4EzdoBNoJcs9sjnIQPIwyRnBGYrRbXUIpEB5Q39AqK3PLY5JK5uEhDQDiUa1QSAstw==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-x64-gnu": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.80.0.tgz",
+ "integrity": "sha512-vSVh5cSo3Xxs6ghBCcFJlpbkbENzDog1qXtoXLa/HC3aCrR4XO76GZbXmQoCPHnu99nQpdCeC3H9tdNICfDh7A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-linux-x64-musl": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.80.0.tgz",
+ "integrity": "sha512-FfzBXpNQ8u7/ZI/p8bl73MeZ508Ax3hxWp3SiJpEFiC+BB9XcXy5FAZHTLKDPSzrUpxQZSZJAVdDmuJp/+HDBQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-openharmony-arm64": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.80.0.tgz",
+ "integrity": "sha512-zMzbkumtmprCgRwoYNzcB3iC39fXdJIMLMU33KdCjEGLlJGOEt1+LwQ4LF8ndLzAEKVz4BR0y3V6Xrkk3Nm3yA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-win32-arm64-msvc": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.80.0.tgz",
+ "integrity": "sha512-ib6iRcrXsk4t1fm3iKcwksyWh1ZkZXC/2mEzakl0ai2+6HZunf1WWMZ/xP9EJAvw9g9K4UVTC3NF/+G2qLrbTQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-win32-ia32-msvc": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.80.0.tgz",
+ "integrity": "sha512-xhRWBMpLxZvgKAH6+DJZmpP+W8Y8UdQOSU1JfxSWNXsaBaRGW77j+1hCuNHlzj7OH4SPN8fYd1q0o2qrDtoVyw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxlint/binding-win32-x64-msvc": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.80.0.tgz",
+ "integrity": "sha512-yAnO7lwBYQnz2pcfBPIGQQZWIX5zd5R/1aAKIF3oE+TVj7IhoHcROjOkz3sRDngzqhfPKfFaXqug5j5rE5dn6Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-android-arm-eabi": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.6.tgz",
+ "integrity": "sha512-b+jTcARdTiFLI6jB4a5XjTm0RWd6KcRfQj/I2356fxUZemiho9zQLxo0RtCuMDAyKcLo6cEltkgbQp6d1+sjjQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-android-arm64": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.6.tgz",
+ "integrity": "sha512-lkWU8ZJaRk9q3CIEY1Tc7vIFALp3Xw5NfGJo2hQg5oIqNgxWi1zI+IiDEK3r70BF5Dzol1tcXsnzsRc8NLhG+Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-arm64": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.6.tgz",
+ "integrity": "sha512-dgR56NYnvAszm7Ob1B2/Vn0e8bUQYZH2UjVaMMtMVOCKFSfjhfLmuA/9+O+F+ajUdG6B/bSssrKW6JJYASa8jA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-x64": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.6.tgz",
+ "integrity": "sha512-vpVxFvUCFioJqug7OTvqptkc4yb8UX0AwfDmJpaR/0sWz+BUmqSVAf7c8JkUgnN8YLspb4a/N6NhTyMAmdyQ7Q==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-freebsd-x64": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.6.tgz",
+ "integrity": "sha512-h1wG6Y6K3JlRswxsI64qQJqBAy4vrLuHgRbc8CZMGSWTOFRY6ghMApM1NKzB2I0n5xV1fjkE18SuVl2QpLeNpA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm-gnueabihf": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.6.tgz",
+ "integrity": "sha512-tbCiqub0q2MVWJKgF5PoAlNWCtQydiOYSLIkd8sByqK/6MMYLJRcSXSYodqYtd0O+Fw7QaVmKKlS4oL94YRZ0w==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-gnu": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.6.tgz",
+ "integrity": "sha512-oxK9+baEBPhZG5HB4URY+uU04zJWeZlH6Tb9rB5DK4DF9XR1uXNLXt5Q5ZsugTKayNCNLhkcwz/ye74hRI98dg==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-musl": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.6.tgz",
+ "integrity": "sha512-muWCk27FVBEZtv0MsK8gnfSmgczA8KQ0uRVJbTABKhkRfQc38aUrcb7fhi3BNiyseFmgcRsoMfQsSNJ+DbZdSw==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-ppc64-gnu": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.6.tgz",
+ "integrity": "sha512-eWDoSfU7Co2qj3vgB3Dt4lj1mG6CoWbcJQkRMP3XJplyCMtuaq3LHvPFjS9QIPvMGWVadJC04Xiy0IdcVPtnwQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-s390x-gnu": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.6.tgz",
+ "integrity": "sha512-2bWNjRSIayvupRKxXUY2tWG9fYdoUlTqWywHRvE8Eq3GvuQ+f2HeIkve697fIt+IQs/PV8yFsdWuhp1aJ1PdnA==",
+ "cpu": [
+ "s390x"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-gnu": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.6.tgz",
+ "integrity": "sha512-KekI0gS0wLxe1UBSQSjenBVwou/JkcQPDzBPICGZjxUv9k3RteHDPBQaiOicZUFKRIH2wKEimGwVpnJsbPzu7w==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-musl": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.6.tgz",
+ "integrity": "sha512-TvtPnfVr+HtyGiDmPK4VWmlNm7QhNNAcK5Q9A7aOXsI8545yCyaoMaicXrFZ72JzeYjaUVk7yT243zT0jzjFKQ==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-openharmony-arm64": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.6.tgz",
+ "integrity": "sha512-iOo0VEay2XFhaCcH0sps5XIimkSuOnNaZrf6+ZkoSOQBJPKNU48RkmJv0/lSpipexu5P+ouFgafe5IGr/DiQfg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-arm64-msvc": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.6.tgz",
+ "integrity": "sha512-y5NTmmasMS455JlOCO4ZM9krIchv3Mvm1crL1iUPGOPgEzSkves9n0SdC5Sjz6+qWDFhd8/JpfWMH8NSWNHe+A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-x64-msvc": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.6.tgz",
+ "integrity": "sha512-np8iZSLfXlAD4kWhiyq/u0Yt8oZDtRQ8lGhQaCXo2rl37KNjeU0GjJuwr4P3oeZ++ROfofsKNBqR5LTO8aXyWQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz",
+ "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==",
+ "license": "MIT"
+ },
+ "node_modules/@tailwindcss/node": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz",
+ "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/remapping": "^2.3.5",
+ "enhanced-resolve": "^5.24.1",
+ "jiti": "^2.7.0",
+ "lightningcss": "1.32.0",
+ "magic-string": "^0.30.21",
+ "source-map-js": "^1.2.1",
+ "tailwindcss": "4.3.3"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.32.0",
+ "lightningcss-darwin-arm64": "1.32.0",
+ "lightningcss-darwin-x64": "1.32.0",
+ "lightningcss-freebsd-x64": "1.32.0",
+ "lightningcss-linux-arm-gnueabihf": "1.32.0",
+ "lightningcss-linux-arm64-gnu": "1.32.0",
+ "lightningcss-linux-arm64-musl": "1.32.0",
+ "lightningcss-linux-x64-gnu": "1.32.0",
+ "lightningcss-linux-x64-musl": "1.32.0",
+ "lightningcss-win32-arm64-msvc": "1.32.0",
+ "lightningcss-win32-x64-msvc": "1.32.0"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-android-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",
+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",
+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-x64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",
+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-freebsd-x64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",
+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",
+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",
+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",
+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",
+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",
+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",
+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/node/node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",
+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@tailwindcss/oxide": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz",
+ "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 20"
+ },
+ "optionalDependencies": {
+ "@tailwindcss/oxide-android-arm64": "4.3.3",
+ "@tailwindcss/oxide-darwin-arm64": "4.3.3",
+ "@tailwindcss/oxide-darwin-x64": "4.3.3",
+ "@tailwindcss/oxide-freebsd-x64": "4.3.3",
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3",
+ "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3",
+ "@tailwindcss/oxide-linux-arm64-musl": "4.3.3",
+ "@tailwindcss/oxide-linux-x64-gnu": "4.3.3",
+ "@tailwindcss/oxide-linux-x64-musl": "4.3.3",
+ "@tailwindcss/oxide-wasm32-wasi": "4.3.3",
+ "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3",
+ "@tailwindcss/oxide-win32-x64-msvc": "4.3.3"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-android-arm64": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz",
+ "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-darwin-arm64": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz",
+ "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-darwin-x64": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz",
+ "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-freebsd-x64": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz",
+ "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz",
+ "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz",
+ "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-arm64-musl": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz",
+ "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-x64-gnu": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz",
+ "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-x64-musl": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz",
+ "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz",
+ "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==",
+ "bundleDependencies": [
+ "@napi-rs/wasm-runtime",
+ "@emnapi/core",
+ "@emnapi/runtime",
+ "@tybys/wasm-util",
+ "@emnapi/wasi-threads",
+ "tslib"
+ ],
+ "cpu": [
+ "wasm32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "^1.11.1",
+ "@emnapi/runtime": "^1.11.1",
+ "@emnapi/wasi-threads": "^1.2.2",
+ "@napi-rs/wasm-runtime": "^1.1.4",
+ "@tybys/wasm-util": "^0.10.2",
+ "tslib": "^2.8.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz",
+ "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-win32-x64-msvc": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz",
+ "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/vite": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz",
+ "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==",
+ "license": "MIT",
+ "dependencies": {
+ "@tailwindcss/node": "4.3.3",
+ "@tailwindcss/oxide": "4.3.3",
+ "tailwindcss": "4.3.3"
+ },
+ "peerDependencies": {
+ "vite": "^5.2.0 || ^6 || ^7 || ^8"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "24.13.3",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz",
+ "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.18.0"
+ }
+ },
+ "node_modules/@types/react": {
+ "version": "19.2.18",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz",
+ "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "csstype": "^3.2.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "19.2.5",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.5.tgz",
+ "integrity": "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.2.0"
+ }
+ },
+ "node_modules/@vitejs/plugin-react": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.0.tgz",
+ "integrity": "sha512-qd2BzUBehkov86WFhg0JkEFEYyCLG9uPCe6qWTY/kRlss9OvJrOF2UbIWT7p+8IzZHkEu0DNGHc4HSv+JdDLsw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rolldown/pluginutils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "peerDependencies": {
+ "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0",
+ "babel-plugin-react-compiler": "^1.0.0",
+ "oxc-transform-react": "^0.145.0",
+ "vite": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@rolldown/plugin-babel": {
+ "optional": true
+ },
+ "babel-plugin-react-compiler": {
+ "optional": true
+ },
+ "oxc-transform-react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/enhanced-resolve": {
+ "version": "5.24.5",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.5.tgz",
+ "integrity": "sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.3.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "license": "ISC"
+ },
+ "node_modules/jiti": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
+ "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
+ "license": "MIT",
+ "bin": {
+ "jiti": "lib/jiti-cli.mjs"
+ }
+ },
+ "node_modules/lightningcss": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
+ "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.33.0",
+ "lightningcss-darwin-arm64": "1.33.0",
+ "lightningcss-darwin-x64": "1.33.0",
+ "lightningcss-freebsd-x64": "1.33.0",
+ "lightningcss-linux-arm-gnueabihf": "1.33.0",
+ "lightningcss-linux-arm64-gnu": "1.33.0",
+ "lightningcss-linux-arm64-musl": "1.33.0",
+ "lightningcss-linux-x64-gnu": "1.33.0",
+ "lightningcss-linux-x64-musl": "1.33.0",
+ "lightningcss-win32-arm64-msvc": "1.33.0",
+ "lightningcss-win32-x64-msvc": "1.33.0"
+ }
+ },
+ "node_modules/lightningcss-android-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",
+ "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz",
+ "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz",
+ "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-freebsd-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz",
+ "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz",
+ "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz",
+ "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz",
+ "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz",
+ "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz",
+ "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==",
+ "cpu": [
+ "x64"
+ ],
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz",
+ "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz",
+ "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.21",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.5"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.18",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
+ "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/oxlint": {
+ "version": "1.80.0",
+ "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.80.0.tgz",
+ "integrity": "sha512-5nTiSps4qdbCWLbxzuO00alHkEO2exR9YMN/ig6QXWrLsYSG0KaObOAM+l6oU2LcKPWoSAGYbkZIGEu1ViiWKA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "oxlint": "bin/oxlint"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/Boshen"
+ },
+ "optionalDependencies": {
+ "@oxlint/binding-android-arm-eabi": "1.80.0",
+ "@oxlint/binding-android-arm64": "1.80.0",
+ "@oxlint/binding-darwin-arm64": "1.80.0",
+ "@oxlint/binding-darwin-x64": "1.80.0",
+ "@oxlint/binding-freebsd-x64": "1.80.0",
+ "@oxlint/binding-linux-arm-gnueabihf": "1.80.0",
+ "@oxlint/binding-linux-arm-musleabihf": "1.80.0",
+ "@oxlint/binding-linux-arm64-gnu": "1.80.0",
+ "@oxlint/binding-linux-arm64-musl": "1.80.0",
+ "@oxlint/binding-linux-ppc64-gnu": "1.80.0",
+ "@oxlint/binding-linux-riscv64-gnu": "1.80.0",
+ "@oxlint/binding-linux-riscv64-musl": "1.80.0",
+ "@oxlint/binding-linux-s390x-gnu": "1.80.0",
+ "@oxlint/binding-linux-x64-gnu": "1.80.0",
+ "@oxlint/binding-linux-x64-musl": "1.80.0",
+ "@oxlint/binding-openharmony-arm64": "1.80.0",
+ "@oxlint/binding-win32-arm64-msvc": "1.80.0",
+ "@oxlint/binding-win32-ia32-msvc": "1.80.0",
+ "@oxlint/binding-win32-x64-msvc": "1.80.0"
+ },
+ "peerDependencies": {
+ "oxlint-tsgolint": ">=7.0.2001",
+ "vite-plus": "*"
+ },
+ "peerDependenciesMeta": {
+ "oxlint-tsgolint": {
+ "optional": true
+ },
+ "vite-plus": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.26",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
+ "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.17",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/react": {
+ "version": "19.2.8",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz",
+ "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.2.8",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz",
+ "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==",
+ "license": "MIT",
+ "dependencies": {
+ "scheduler": "^0.27.0"
+ },
+ "peerDependencies": {
+ "react": "^19.2.8"
+ }
+ },
+ "node_modules/rolldown": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.6.tgz",
+ "integrity": "sha512-vMM4q3aixf46GiF1Kok8jDPFsEpXgFWGjUHXNkNHNm+Y2adXAG2dbX91jkti3i0ZRsOlcmbuzAz1poObSHCmUA==",
+ "license": "MIT",
+ "dependencies": {
+ "@oxc-project/types": "=0.147.0",
+ "@rolldown/pluginutils": "^1.0.0"
+ },
+ "bin": {
+ "rolldown": "bin/cli.mjs"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "optionalDependencies": {
+ "@rolldown/binding-android-arm-eabi": "1.2.6",
+ "@rolldown/binding-android-arm64": "1.2.6",
+ "@rolldown/binding-darwin-arm64": "1.2.6",
+ "@rolldown/binding-darwin-x64": "1.2.6",
+ "@rolldown/binding-freebsd-x64": "1.2.6",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.2.6",
+ "@rolldown/binding-linux-arm64-gnu": "1.2.6",
+ "@rolldown/binding-linux-arm64-musl": "1.2.6",
+ "@rolldown/binding-linux-ppc64-gnu": "1.2.6",
+ "@rolldown/binding-linux-s390x-gnu": "1.2.6",
+ "@rolldown/binding-linux-x64-gnu": "1.2.6",
+ "@rolldown/binding-linux-x64-musl": "1.2.6",
+ "@rolldown/binding-openharmony-arm64": "1.2.6",
+ "@rolldown/binding-win32-arm64-msvc": "1.2.6",
+ "@rolldown/binding-win32-x64-msvc": "1.2.6"
+ }
+ },
+ "node_modules/scheduler": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
+ "license": "MIT"
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz",
+ "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==",
+ "license": "MIT"
+ },
+ "node_modules/tapable": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz",
+ "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
+ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
+ "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
+ "devOptional": true,
+ "license": "MIT"
+ },
+ "node_modules/vite": {
+ "version": "8.2.2",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz",
+ "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==",
+ "license": "MIT",
+ "dependencies": {
+ "lightningcss": "^1.33.0",
+ "picomatch": "^4.0.5",
+ "postcss": "^8.5.26",
+ "rolldown": "~1.2.4",
+ "tinyglobby": "^0.2.17"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "@vitejs/devtools": "^0.4.0 || ^0.5.0",
+ "esbuild": "^0.27.0 || ^0.28.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "@vitejs/devtools": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/website/package.json b/website/package.json
new file mode 100644
index 00000000..367d114e
--- /dev/null
+++ b/website/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "website",
+ "private": true,
+ "version": "0.0.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "tsc -b && vite build",
+ "lint": "oxlint",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "@tailwindcss/vite": "^4.3.3",
+ "react": "^19.2.8",
+ "react-dom": "^19.2.8",
+ "tailwindcss": "^4.3.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.13.3",
+ "@types/react": "^19.2.18",
+ "@types/react-dom": "^19.2.4",
+ "@vitejs/plugin-react": "^6.1.0",
+ "oxlint": "^1.79.0",
+ "typescript": "~6.0.2",
+ "vite": "^8.2.2"
+ }
+}
diff --git a/website/public/audio/voice-after.mp3 b/website/public/audio/voice-after.mp3
new file mode 100644
index 00000000..0279eb76
Binary files /dev/null and b/website/public/audio/voice-after.mp3 differ
diff --git a/website/public/audio/voice-before.mp3 b/website/public/audio/voice-before.mp3
new file mode 100644
index 00000000..299065d2
Binary files /dev/null and b/website/public/audio/voice-before.mp3 differ
diff --git a/website/public/favicon.svg b/website/public/favicon.svg
new file mode 100644
index 00000000..6893eb13
--- /dev/null
+++ b/website/public/favicon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
\ No newline at end of file
diff --git a/website/public/icons.svg b/website/public/icons.svg
new file mode 100644
index 00000000..e9522193
--- /dev/null
+++ b/website/public/icons.svg
@@ -0,0 +1,24 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <symbol id="bluesky-icon" viewBox="0 0 16 17">
+ <g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
+ <defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
+ </symbol>
+ <symbol id="discord-icon" viewBox="0 0 20 19">
+ <path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
+ </symbol>
+ <symbol id="documentation-icon" viewBox="0 0 21 20">
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
+ </symbol>
+ <symbol id="github-icon" viewBox="0 0 19 19">
+ <path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
+ </symbol>
+ <symbol id="social-icon" viewBox="0 0 20 20">
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
+ <path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
+ </symbol>
+ <symbol id="x-icon" viewBox="0 0 19 19">
+ <path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
+ </symbol>
+</svg>
diff --git a/website/public/wolfcut.png b/website/public/wolfcut.png
new file mode 100644
index 00000000..b7295b70
Binary files /dev/null and b/website/public/wolfcut.png differ
diff --git a/website/src/App.tsx b/website/src/App.tsx
new file mode 100644
index 00000000..8cca86e8
--- /dev/null
+++ b/website/src/App.tsx
@@ -0,0 +1,23 @@
+import Navbar from './components/Navbar'
+import Footer from './components/Footer'
+import Hero from './sections/Hero'
+import Features from './sections/Features'
+import Showcase from './sections/Showcase'
+import AudioComparison from './sections/AudioComparison'
+import CallToAction from './sections/CallToAction'
+
+export default function App() {
+ return (
+ <>
+ <Navbar />
+ <main>
+ <Hero />
+ <Features />
+ <Showcase />
+ <AudioComparison />
+ <CallToAction />
+ </main>
+ <Footer />
+ </>
+ )
+}
diff --git a/website/src/assets/editor-preview.png b/website/src/assets/editor-preview.png
new file mode 100644
index 00000000..86fde68b
Binary files /dev/null and b/website/src/assets/editor-preview.png differ
diff --git a/website/src/assets/hero.png b/website/src/assets/hero.png
new file mode 100644
index 00000000..02251f4b
Binary files /dev/null and b/website/src/assets/hero.png differ
diff --git a/website/src/assets/screenshot-dark.png b/website/src/assets/screenshot-dark.png
new file mode 100644
index 00000000..8772b896
Binary files /dev/null and b/website/src/assets/screenshot-dark.png differ
diff --git a/website/src/assets/screenshot-light.png b/website/src/assets/screenshot-light.png
new file mode 100644
index 00000000..741279db
Binary files /dev/null and b/website/src/assets/screenshot-light.png differ
diff --git a/website/src/assets/vite.svg b/website/src/assets/vite.svg
new file mode 100644
index 00000000..5101b674
--- /dev/null
+++ b/website/src/assets/vite.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>
diff --git a/website/src/assets/wolfcut_logo_512.png b/website/src/assets/wolfcut_logo_512.png
new file mode 100644
index 00000000..b7295b70
Binary files /dev/null and b/website/src/assets/wolfcut_logo_512.png differ
diff --git a/website/src/components/AudioPlayer.tsx b/website/src/components/AudioPlayer.tsx
new file mode 100644
index 00000000..078c3786
--- /dev/null
+++ b/website/src/components/AudioPlayer.tsx
@@ -0,0 +1,216 @@
+import { useEffect, useRef, useState } from 'react'
+
+type AudioPlayerProps = {
+ src: string
+ label: string
+ caption?: string
+ playing: boolean
+ onPlayChange: (playing: boolean) => void
+ /** Accent styling for the card that shows the effect applied. */
+ accent?: boolean
+}
+
+const BAR_COUNT = 56
+
+/* Stand-in waveform shown until the real peaks are decoded, so the layout
+ never jumps. Deterministic — same shape on every render. */
+const FALLBACK_PEAKS = Array.from(
+ { length: BAR_COUNT },
+ (_, i) => 0.3 + 0.25 * Math.sin(i * 0.9) * Math.sin(i * 0.23),
+)
+
+function formatTime(seconds: number) {
+ if (!Number.isFinite(seconds) || seconds < 0) return '0:00'
+ const m = Math.floor(seconds / 60)
+ const s = Math.floor(seconds % 60)
+ return `${m}:${s.toString().padStart(2, '0')}`
+}
+
+/** Waveform audio card. Playback state is lifted so a parent can ensure only
+ * one player is audible at a time. */
+export default function AudioPlayer({
+ src,
+ label,
+ caption,
+ playing,
+ onPlayChange,
+ accent = false,
+}: AudioPlayerProps) {
+ const audioRef = useRef<HTMLAudioElement>(null)
+ const scrubbing = useRef(false)
+ const [currentTime, setCurrentTime] = useState(0)
+ const [duration, setDuration] = useState(0)
+ const [missing, setMissing] = useState(false)
+ const [peaks, setPeaks] = useState<number[] | null>(null)
+
+ useEffect(() => {
+ const audio = audioRef.current
+ if (!audio) return
+ if (playing) {
+ audio.play().catch(() => onPlayChange(false))
+ } else {
+ audio.pause()
+ }
+ }, [playing, onPlayChange])
+
+ useEffect(() => {
+ let cancelled = false
+ const ctx = new AudioContext()
+ fetch(src)
+ .then((res) => {
+ if (!res.ok) throw new Error(`${res.status}`)
+ return res.arrayBuffer()
+ })
+ .then((buf) => ctx.decodeAudioData(buf))
+ .then((decoded) => {
+ if (cancelled) return
+ const data = decoded.getChannelData(0)
+ const step = Math.floor(data.length / BAR_COUNT)
+ const raw: number[] = []
+ for (let i = 0; i < BAR_COUNT; i++) {
+ let peak = 0
+ for (let j = i * step; j < (i + 1) * step; j += 32) {
+ const v = Math.abs(data[j])
+ if (v > peak) peak = v
+ }
+ raw.push(peak)
+ }
+ const max = Math.max(...raw, 0.01)
+ setPeaks(raw.map((p) => Math.max(p / max, 0.08)))
+ })
+ .catch(() => {
+ /* keep the fallback shape; a truly missing file is caught by <audio> */
+ })
+ .finally(() => void ctx.close())
+ return () => {
+ cancelled = true
+ }
+ }, [src])
+
+ const seekToClientX = (clientX: number, target: HTMLElement) => {
+ const audio = audioRef.current
+ if (!audio || !duration) return
+ const rect = target.getBoundingClientRect()
+ const fraction = Math.min(Math.max((clientX - rect.left) / rect.width, 0), 1)
+ audio.currentTime = fraction * duration
+ setCurrentTime(audio.currentTime)
+ }
+
+ const seekBy = (delta: number) => {
+ const audio = audioRef.current
+ if (!audio || !duration) return
+ audio.currentTime = Math.min(Math.max(audio.currentTime + delta, 0), duration)
+ setCurrentTime(audio.currentTime)
+ }
+
+ const progress = duration ? currentTime / duration : 0
+ const bars = peaks ?? FALLBACK_PEAKS
+ const playedColor = accent ? 'bg-accent' : 'bg-ink'
+ const remaining = duration - currentTime
+
+ return (
+ <div className="rounded-2xl bg-surface p-6 ring-1 ring-hairline/60">
+ <div className="flex items-center justify-between">
+ <span
+ className={`rounded-full px-2.5 py-0.5 text-xs font-medium ${
+ accent ? 'bg-accent/10 text-accent' : 'bg-surface-alt text-ink-secondary'
+ }`}
+ >
+ {label}
+ </span>
+ {caption && <span className="text-xs text-ink-tertiary">{caption}</span>}
+ </div>
+
+ <audio
+ ref={audioRef}
+ src={src}
+ preload="metadata"
+ onTimeUpdate={(e) => {
+ if (!scrubbing.current) setCurrentTime(e.currentTarget.currentTime)
+ }}
+ onLoadedMetadata={(e) => setDuration(e.currentTarget.duration)}
+ onEnded={() => onPlayChange(false)}
+ onError={() => setMissing(true)}
+ />
+
+ {missing ? (
+ <p className="mt-5 text-xs text-ink-tertiary">
+ Audio not found — add <code className="font-mono">{src}</code>
+ </p>
+ ) : (
+ <div className="mt-5 flex items-center gap-4">
+ <button
+ type="button"
+ onClick={() => onPlayChange(!playing)}
+ aria-label={playing ? `Pause ${label}` : `Play ${label}`}
+ className={`flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-white transition-all hover:scale-105 active:scale-95 ${
+ accent ? 'bg-accent hover:bg-accent-hover' : 'bg-ink hover:opacity-85'
+ }`}
+ >
+ {playing ? (
+ <svg width="11" height="12" viewBox="0 0 11 12" fill="currentColor">
+ <rect x="0" y="0" width="4" height="12" rx="1" />
+ <rect x="7" y="0" width="4" height="12" rx="1" />
+ </svg>
+ ) : (
+ <svg
+ width="12"
+ height="12"
+ viewBox="0 0 12 12"
+ fill="currentColor"
+ className="translate-x-px"
+ >
+ <path d="M2.1.6a1 1 0 0 0-1.5.87v9.06a1 1 0 0 0 1.5.87l7.8-4.53a1 1 0 0 0 0-1.74L2.1.6Z" />
+ </svg>
+ )}
+ </button>
+
+ <div className="min-w-0 flex-1">
+ <div
+ role="slider"
+ tabIndex={0}
+ aria-label={`Seek ${label}`}
+ aria-valuemin={0}
+ aria-valuemax={Math.round(duration)}
+ aria-valuenow={Math.round(currentTime)}
+ aria-valuetext={`${formatTime(currentTime)} of ${formatTime(duration)}`}
+ onPointerDown={(e) => {
+ scrubbing.current = true
+ e.currentTarget.setPointerCapture(e.pointerId)
+ seekToClientX(e.clientX, e.currentTarget)
+ }}
+ onPointerMove={(e) => {
+ if (scrubbing.current) seekToClientX(e.clientX, e.currentTarget)
+ }}
+ onPointerUp={() => {
+ scrubbing.current = false
+ }}
+ onKeyDown={(e) => {
+ if (e.key === 'ArrowLeft') seekBy(-5)
+ if (e.key === 'ArrowRight') seekBy(5)
+ }}
+ className="flex h-12 cursor-pointer touch-none items-center gap-[2px] rounded-md outline-offset-4 focus-visible:outline-2 focus-visible:outline-accent"
+ >
+ {bars.map((peak, i) => {
+ const played = (i + 0.5) / BAR_COUNT <= progress
+ return (
+ <div
+ key={i}
+ className={`min-w-0 flex-1 rounded-full transition-colors duration-75 ${
+ played ? playedColor : 'bg-hairline'
+ } ${peaks ? '' : 'animate-pulse'}`}
+ style={{ height: `${Math.round(peak * 100)}%` }}
+ />
+ )
+ })}
+ </div>
+ <div className="mt-1.5 flex justify-between text-[11px] text-ink-tertiary tabular-nums">
+ <span>{formatTime(currentTime)}</span>
+ <span>&minus;{formatTime(remaining)}</span>
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ )
+}
diff --git a/website/src/components/DownloadButton.tsx b/website/src/components/DownloadButton.tsx
new file mode 100644
index 00000000..5e3141dc
--- /dev/null
+++ b/website/src/components/DownloadButton.tsx
@@ -0,0 +1,149 @@
+import { useEffect, useRef, useState } from 'react'
+
+type Os = 'mac' | 'windows' | 'linux'
+
+const DOWNLOAD_URLS: Record<Exclude<Os, 'linux'>, string> = {
+ mac: 'https://github.com/jub0t/WolfCut/releases',
+ windows: 'https://github.com/jub0t/WolfCut/releases',
+}
+
+function detectOs(): Exclude<Os, 'linux'> {
+ if (typeof navigator !== 'undefined' && /win/i.test(navigator.platform)) {
+ return 'windows'
+ }
+ return 'mac'
+}
+
+const OS_LABELS: Record<Os, string> = {
+ mac: 'macOS',
+ windows: 'Windows',
+ linux: 'Linux',
+}
+
+function AppleIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden="true">
+ <path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" />
+ </svg>
+ )
+}
+
+function WindowsIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden="true">
+ <path d="M3 5.55l7.36-1.01v7.1H3V5.55zm0 12.9l7.36 1.01v-7.02H3v6.01zm8.17 1.12L21 21V12.44h-9.83v7.13zm0-15.13v7.2H21V3L11.17 4.44z" />
+ </svg>
+ )
+}
+
+function LinuxIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 24 24" fill="currentColor" className={className} aria-hidden="true">
+ <path d="M12 2c-2.21 0-3.5 1.79-3.5 4 0 1.5.3 2.34-.5 3.5-1.13 1.64-2.5 3.5-2.5 5.5 0 .82.16 1.6.46 2.31-.28.16-.51.38-.68.65-.33.52-.4 1.17-.28 1.79.06.31.27.55.55.66.85.33 1.9.51 2.95.7.5.62 1.66 1.39 3.5 1.39s3-.77 3.5-1.39c1.05-.19 2.1-.37 2.95-.7.28-.11.49-.35.55-.66.12-.62.05-1.27-.28-1.79-.17-.27-.4-.49-.68-.65.3-.71.46-1.49.46-2.31 0-2-1.37-3.86-2.5-5.5-.8-1.16-.5-2-.5-3.5 0-2.21-1.29-4-3.5-4zm-1.5 5.5c.28 0 .5.34.5.75s-.22.75-.5.75-.5-.34-.5-.75.22-.75.5-.75zm3 0c.28 0 .5.34.5.75s-.22.75-.5.75-.5-.34-.5-.75.22-.75.5-.75z" />
+ </svg>
+ )
+}
+
+const OS_ICONS: Record<Os, typeof AppleIcon> = {
+ mac: AppleIcon,
+ windows: WindowsIcon,
+ linux: LinuxIcon,
+}
+
+export default function DownloadButton({ size = 'md' }: { size?: 'md' | 'lg' }) {
+ const [open, setOpen] = useState(false)
+ const rootRef = useRef<HTMLDivElement>(null)
+ const defaultOs = detectOs()
+ const DefaultIcon = OS_ICONS[defaultOs]
+
+ useEffect(() => {
+ if (!open) return
+ function onPointerDown(e: PointerEvent) {
+ if (rootRef.current && !rootRef.current.contains(e.target as Node)) {
+ setOpen(false)
+ }
+ }
+ function onKeyDown(e: KeyboardEvent) {
+ if (e.key === 'Escape') setOpen(false)
+ }
+ document.addEventListener('pointerdown', onPointerDown)
+ document.addEventListener('keydown', onKeyDown)
+ return () => {
+ document.removeEventListener('pointerdown', onPointerDown)
+ document.removeEventListener('keydown', onKeyDown)
+ }
+ }, [open])
+
+ const mainClasses =
+ size === 'lg'
+ ? 'gap-2.5 pl-7 pr-5 py-3.5 text-base'
+ : 'gap-2 pl-6 pr-4 py-2.5 text-sm'
+ const chevronClasses = size === 'lg' ? 'pl-3 pr-4 py-3.5' : 'pl-2.5 pr-3.5 py-2.5'
+
+ return (
+ <div ref={rootRef} className="relative inline-flex">
+ <a
+ href={DOWNLOAD_URLS[defaultOs]}
+ className={`inline-flex items-center rounded-l-full bg-accent font-medium text-white transition-colors hover:bg-accent-hover ${mainClasses}`}
+ >
+ <DefaultIcon className={size === 'lg' ? 'size-5' : 'size-4'} />
+ Download for {OS_LABELS[defaultOs]}
+ </a>
+ <button
+ type="button"
+ aria-label="Download for other platforms"
+ aria-haspopup="menu"
+ aria-expanded={open}
+ onClick={() => setOpen((v) => !v)}
+ className={`inline-flex items-center rounded-r-full border-l border-white/25 bg-accent text-white transition-colors hover:bg-accent-hover ${chevronClasses}`}
+ >
+ <svg
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.8"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ className={`${size === 'lg' ? 'size-4' : 'size-3.5'} transition-transform ${open ? 'rotate-180' : ''}`}
+ aria-hidden="true"
+ >
+ <path d="M4 6l4 4 4-4" />
+ </svg>
+ </button>
+
+ {open && (
+ <div
+ role="menu"
+ className="absolute top-full right-0 z-20 mt-2 w-56 overflow-hidden rounded-2xl border border-hairline bg-surface py-1.5 text-left shadow-lg"
+ >
+ {(['mac', 'windows'] as const).map((os) => {
+ const Icon = OS_ICONS[os]
+ return (
+ <a
+ key={os}
+ role="menuitem"
+ href={DOWNLOAD_URLS[os]}
+ onClick={() => setOpen(false)}
+ className="flex items-center gap-3 px-4 py-2.5 text-sm text-ink transition-colors hover:bg-surface-alt"
+ >
+ <Icon className="size-4.5 text-ink-secondary" />
+ Download for {OS_LABELS[os]}
+ </a>
+ )
+ })}
+ <div
+ role="menuitem"
+ aria-disabled="true"
+ className="flex cursor-default items-center gap-3 px-4 py-2.5 text-sm text-ink-tertiary"
+ >
+ <LinuxIcon className="size-4.5" />
+ Download for Linux
+ <span className="ml-auto rounded-full bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-ink-secondary">
+ Coming soon
+ </span>
+ </div>
+ </div>
+ )}
+ </div>
+ )
+}
diff --git a/website/src/components/Footer.tsx b/website/src/components/Footer.tsx
new file mode 100644
index 00000000..56b12d43
--- /dev/null
+++ b/website/src/components/Footer.tsx
@@ -0,0 +1,37 @@
+const links = [
+ { label: 'GitHub', href: 'https://github.com/jub0t/WolfCut' },
+ { label: 'Releases', href: 'https://github.com/jub0t/WolfCut/releases' },
+ { label: 'Report an issue', href: 'https://github.com/jub0t/WolfCut/issues' },
+]
+
+export default function Footer() {
+ return (
+ <footer className="border-t border-hairline/60 bg-surface-alt">
+ <div className="mx-auto max-w-5xl px-6 py-10">
+ <p className="text-xs text-ink-tertiary">
+ WolfCut is free, open-source software under active development —
+ things move fast and edges are sharp. CapCut is a trademark of its
+ respective owner; WolfCut is not affiliated with it.
+ </p>
+ <div className="mt-4 flex flex-col justify-between gap-4 border-t border-hairline/60 pt-4 sm:flex-row">
+ <p className="text-xs text-ink-secondary">
+ Copyright &copy; {new Date().getFullYear()} WolfCut.
+ </p>
+ <div className="flex gap-6">
+ {links.map((link) => (
+ <a
+ key={link.label}
+ href={link.href}
+ target="_blank"
+ rel="noreferrer"
+ className="text-xs text-ink-secondary transition-colors hover:text-ink"
+ >
+ {link.label}
+ </a>
+ ))}
+ </div>
+ </div>
+ </div>
+ </footer>
+ )
+}
diff --git a/website/src/components/MediaPlaceholder.tsx b/website/src/components/MediaPlaceholder.tsx
new file mode 100644
index 00000000..23b7fb12
--- /dev/null
+++ b/website/src/components/MediaPlaceholder.tsx
@@ -0,0 +1,18 @@
+type MediaPlaceholderProps = {
+ label?: string
+ aspect?: string
+}
+
+/** Neutral block standing in for future imagery or video. */
+export default function MediaPlaceholder({
+ label = 'Media',
+ aspect = 'aspect-[16/9]',
+}: MediaPlaceholderProps) {
+ return (
+ <div
+ className={`flex w-full items-center justify-center rounded-3xl bg-surface-alt ${aspect}`}
+ >
+ <span className="text-sm text-ink-tertiary">{label}</span>
+ </div>
+ )
+}
diff --git a/website/src/components/Navbar.tsx b/website/src/components/Navbar.tsx
new file mode 100644
index 00000000..b4b733d9
--- /dev/null
+++ b/website/src/components/Navbar.tsx
@@ -0,0 +1,50 @@
+import logo from '../assets/wolfcut_logo_512.png'
+
+const links = [
+ { label: 'Overview', href: '#overview' },
+ { label: 'Features', href: '#features' },
+ { label: 'Engine', href: '#engine' },
+ { label: 'Voice', href: '#audio' },
+]
+
+export default function Navbar() {
+ return (
+ <header className="sticky top-0 z-50 border-b border-hairline/60 bg-surface/80 backdrop-blur-md">
+ <nav className="mx-auto flex h-12 max-w-5xl items-center justify-between px-6">
+ <a href="#" className="flex items-center gap-2 text-sm font-semibold tracking-tight">
+ <img src={logo} alt="" className="size-6" />
+ WolfCut
+ </a>
+ <div className="hidden items-center gap-8 sm:flex">
+ {links.map((link) => (
+ <a
+ key={link.href}
+ href={link.href}
+ className="text-xs text-ink-secondary transition-colors hover:text-ink"
+ >
+ {link.label}
+ </a>
+ ))}
+ </div>
+ <div className="flex items-center gap-4">
+ <a
+ href="https://github.com/jub0t/WolfCut"
+ target="_blank"
+ rel="noreferrer"
+ className="text-xs text-ink-secondary transition-colors hover:text-ink"
+ >
+ GitHub
+ </a>
+ <a
+ href="https://github.com/jub0t/WolfCut/releases"
+ target="_blank"
+ rel="noreferrer"
+ className="rounded-full bg-accent px-3.5 py-1 text-xs font-medium text-white transition-colors hover:bg-accent-hover"
+ >
+ Download
+ </a>
+ </div>
+ </nav>
+ </header>
+ )
+}
diff --git a/website/src/components/Section.tsx b/website/src/components/Section.tsx
new file mode 100644
index 00000000..d755580b
--- /dev/null
+++ b/website/src/components/Section.tsx
@@ -0,0 +1,16 @@
+import type { ReactNode } from 'react'
+
+type SectionProps = {
+ id?: string
+ alt?: boolean
+ children: ReactNode
+}
+
+/** Full-width section band with consistent vertical rhythm. */
+export default function Section({ id, alt = false, children }: SectionProps) {
+ return (
+ <section id={id} className={alt ? 'bg-surface-alt' : 'bg-surface'}>
+ <div className="mx-auto max-w-5xl px-6 py-24 sm:py-32">{children}</div>
+ </section>
+ )
+}
diff --git a/website/src/index.css b/website/src/index.css
new file mode 100644
index 00000000..fe0df66c
--- /dev/null
+++ b/website/src/index.css
@@ -0,0 +1,25 @@
+@import "tailwindcss";
+
+@theme {
+ --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
+ "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
+
+ /* Core palette — light, restrained */
+ --color-ink: #1d1d1f;
+ --color-ink-secondary: #6e6e73;
+ --color-ink-tertiary: #86868b;
+ --color-surface: #ffffff;
+ --color-surface-alt: #f5f5f7;
+ --color-accent: #0071e3;
+ --color-accent-hover: #0077ed;
+ --color-hairline: #d2d2d7;
+}
+
+html {
+ scroll-behavior: smooth;
+}
+
+body {
+ @apply bg-surface text-ink font-sans antialiased;
+ text-rendering: optimizeLegibility;
+}
diff --git a/website/src/main.tsx b/website/src/main.tsx
new file mode 100644
index 00000000..bef5202a
--- /dev/null
+++ b/website/src/main.tsx
@@ -0,0 +1,10 @@
+import { StrictMode } from 'react'
+import { createRoot } from 'react-dom/client'
+import './index.css'
+import App from './App.tsx'
+
+createRoot(document.getElementById('root')!).render(
+ <StrictMode>
+ <App />
+ </StrictMode>,
+)
diff --git a/website/src/sections/AudioComparison.tsx b/website/src/sections/AudioComparison.tsx
new file mode 100644
index 00000000..94accb2c
--- /dev/null
+++ b/website/src/sections/AudioComparison.tsx
@@ -0,0 +1,57 @@
+import { useState } from 'react'
+import Section from '../components/Section'
+import AudioPlayer from '../components/AudioPlayer'
+
+/* Demo clips for the Sweet voice effect (test/sweet_voice.py).
+ Generate the pair into website/public/audio/ with:
+ python3 test/sweet_voice.py voice-before.mp3 voice-after.mp3 */
+const clips = [
+ {
+ id: 'before',
+ label: 'Before',
+ caption: 'Original recording',
+ src: '/audio/voice-before.mp3',
+ accent: false,
+ },
+ {
+ id: 'after',
+ label: 'After',
+ caption: 'Sweet voice effect',
+ src: '/audio/voice-after.mp3',
+ accent: true,
+ },
+] as const
+
+type ClipId = (typeof clips)[number]['id']
+
+export default function AudioComparison() {
+ const [activeClip, setActiveClip] = useState<ClipId | null>(null)
+
+ return (
+ <Section id="audio" alt>
+ <div className="text-center">
+ <h2 className="text-4xl font-semibold tracking-tight text-balance sm:text-5xl">
+ Voice filters, free for everyone.
+ </h2>
+ <p className="mx-auto mt-4 max-w-xl text-lg text-ink-secondary">
+ The effects CapCut puts behind Pro, included for everyone. Here the
+ Sweet voice effect lifts pitch, adds air, and smooths sibilance —
+ same take, one pass.
+ </p>
+ </div>
+ <div className="mx-auto mt-16 grid max-w-3xl gap-4 sm:grid-cols-2">
+ {clips.map((clip) => (
+ <AudioPlayer
+ key={clip.id}
+ src={clip.src}
+ label={clip.label}
+ caption={clip.caption}
+ accent={clip.accent}
+ playing={activeClip === clip.id}
+ onPlayChange={(playing) => setActiveClip(playing ? clip.id : null)}
+ />
+ ))}
+ </div>
+ </Section>
+ )
+}
diff --git a/website/src/sections/CallToAction.tsx b/website/src/sections/CallToAction.tsx
new file mode 100644
index 00000000..5f5ec889
--- /dev/null
+++ b/website/src/sections/CallToAction.tsx
@@ -0,0 +1,32 @@
+import DownloadButton from '../components/DownloadButton'
+import Section from '../components/Section'
+
+export default function CallToAction() {
+ return (
+ <Section>
+ <div className="text-center">
+ <h2 className="text-4xl font-semibold tracking-tight text-balance sm:text-5xl">
+ Start cutting.
+ </h2>
+ <p className="mx-auto mt-4 max-w-md text-lg text-ink-secondary">
+ Free forever. No account, no watermark, no subscription.
+ </p>
+ <div className="mt-8">
+ <DownloadButton />
+ </div>
+ <p className="mt-4 text-sm text-ink-tertiary">
+ Or{' '}
+ <a
+ href="https://github.com/jub0t/WolfCut"
+ target="_blank"
+ rel="noreferrer"
+ className="text-accent hover:underline"
+ >
+ build it from source
+ </a>{' '}
+ — it&rsquo;s open.
+ </p>
+ </div>
+ </Section>
+ )
+}
diff --git a/website/src/sections/Features.tsx b/website/src/sections/Features.tsx
new file mode 100644
index 00000000..b26d2134
--- /dev/null
+++ b/website/src/sections/Features.tsx
@@ -0,0 +1,75 @@
+import Section from '../components/Section'
+import screenshotLight from '../assets/screenshot-light.png'
+import screenshotDark from '../assets/screenshot-dark.png'
+
+const features = [
+ {
+ title: 'A real multi-track timeline.',
+ body: 'Cut, trim, split, and arrange video, audio, and text across tracks. The editing you already know, without the ceiling you already hit.',
+ image: screenshotLight,
+ alt: 'The WolfCut timeline in the light theme',
+ },
+ {
+ title: 'No watermarks. Ever.',
+ body: 'Your exports are yours, at full quality, on the free plan — because there is no other plan. No stamp in the corner, no export limit, no upsell.',
+ image: screenshotDark,
+ alt: 'The WolfCut editor in the dark theme',
+ },
+]
+
+const details = [
+ {
+ title: 'Native performance',
+ body: 'A Rust engine does the heavy lifting — not a browser pretending to.',
+ },
+ {
+ title: 'Lightweight',
+ body: 'A few megabytes on disk. Opens in a blink.',
+ },
+ {
+ title: 'No account, no setup',
+ body: 'No sign-up, no cloud, no extra downloads. It all runs on your machine.',
+ },
+ {
+ title: 'macOS & Windows',
+ body: 'One editor, both platforms. Linux is on the way.',
+ },
+]
+
+export default function Features() {
+ return (
+ <Section id="features" alt>
+ <div className="text-center">
+ <h2 className="text-4xl font-semibold tracking-tight text-balance sm:text-5xl">
+ Everything essential. Nothing extra.
+ </h2>
+ <p className="mx-auto mt-4 max-w-xl text-lg text-ink-secondary">
+ The tools you actually use, unlocked from day one.
+ </p>
+ </div>
+ <div className="mt-16 grid gap-16 sm:grid-cols-2 sm:gap-12">
+ {features.map((feature) => (
+ <div key={feature.title}>
+ <img
+ src={feature.image}
+ alt={feature.alt}
+ className="w-full rounded-2xl border border-hairline/60"
+ />
+ <h3 className="mt-6 text-xl font-semibold tracking-tight">
+ {feature.title}
+ </h3>
+ <p className="mt-2 text-ink-secondary">{feature.body}</p>
+ </div>
+ ))}
+ </div>
+ <div className="mt-16 grid gap-10 sm:grid-cols-2 lg:grid-cols-4">
+ {details.map((detail) => (
+ <div key={detail.title}>
+ <h3 className="text-sm font-semibold">{detail.title}</h3>
+ <p className="mt-1.5 text-sm text-ink-secondary">{detail.body}</p>
+ </div>
+ ))}
+ </div>
+ </Section>
+ )
+}
diff --git a/website/src/sections/Hero.tsx b/website/src/sections/Hero.tsx
new file mode 100644
index 00000000..b1b58fbc
--- /dev/null
+++ b/website/src/sections/Hero.tsx
@@ -0,0 +1,34 @@
+import DownloadButton from '../components/DownloadButton'
+import editorPreview from '../assets/editor-preview.png'
+
+export default function Hero() {
+ return (
+ <section id="overview" className="bg-surface">
+ <div className="mx-auto max-w-5xl px-6 pt-24 pb-16 text-center sm:pt-32">
+ <p className="text-sm font-medium text-accent">Free &amp; open source</p>
+ <h1 className="mt-3 text-5xl font-semibold tracking-tighter text-balance sm:text-7xl">
+ Everything CapCut does.
+ <br />
+ Nothing it charges for.
+ </h1>
+ <p className="mx-auto mt-6 max-w-xl text-lg text-ink-secondary text-pretty sm:text-xl">
+ WolfCut is a native video editor with no watermarks, no paywalls, and
+ no account. Install it and start cutting.
+ </p>
+ <div className="mt-8 flex items-center justify-center gap-4">
+ <DownloadButton size="lg" />
+ <a href="#features" className="text-sm text-accent hover:underline">
+ Learn more &rsaquo;
+ </a>
+ </div>
+ </div>
+ <div className="mx-auto max-w-6xl px-6 pb-24">
+ <img
+ src={editorPreview}
+ alt="The WolfCut editor in dark and light themes"
+ className="w-full rounded-2xl border border-hairline/60 shadow-lg"
+ />
+ </div>
+ </section>
+ )
+}
diff --git a/website/src/sections/Showcase.tsx b/website/src/sections/Showcase.tsx
new file mode 100644
index 00000000..36d460c9
--- /dev/null
+++ b/website/src/sections/Showcase.tsx
@@ -0,0 +1,35 @@
+import Section from '../components/Section'
+import screenshotDark from '../assets/screenshot-dark.png'
+
+export default function Showcase() {
+ return (
+ <Section id="engine">
+ <div className="grid items-center gap-12 sm:grid-cols-2">
+ <div>
+ <h2 className="text-4xl font-semibold tracking-tight text-balance sm:text-5xl">
+ A Rust engine under the hood.
+ </h2>
+ <p className="mt-4 text-lg text-ink-secondary">
+ Decoding, compositing, effects, and export all run in a native
+ engine written in Rust — the interface just tells it what to do.
+ That&rsquo;s why WolfCut stays a few megabytes, opens instantly,
+ and scrubs smoothly where web-based editors stutter.
+ </p>
+ <a
+ href="https://github.com/jub0t/WolfCut/blob/main/ARCHITECTURE.md"
+ target="_blank"
+ rel="noreferrer"
+ className="mt-6 inline-block text-sm text-accent hover:underline"
+ >
+ Read the architecture &rsaquo;
+ </a>
+ </div>
+ <img
+ src={screenshotDark}
+ alt="The WolfCut editor rendering a project in the dark theme"
+ className="w-full rounded-2xl border border-hairline/60 shadow-lg"
+ />
+ </div>
+ </Section>
+ )
+}
diff --git a/website/tsconfig.app.json b/website/tsconfig.app.json
new file mode 100644
index 00000000..6830b6f7
--- /dev/null
+++ b/website/tsconfig.app.json
@@ -0,0 +1,26 @@
+{
+ "compilerOptions": {
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
+ "target": "es2023",
+ "lib": ["ES2023", "DOM"],
+ "module": "esnext",
+ "types": ["vite/client"],
+ "allowArbitraryExtensions": true,
+ "skipLibCheck": true,
+
+ /* Bundler mode */
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "moduleDetection": "force",
+ "noEmit": true,
+ "jsx": "react-jsx",
+
+ /* Linting */
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "erasableSyntaxOnly": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "include": ["src"]
+}
diff --git a/website/tsconfig.json b/website/tsconfig.json
new file mode 100644
index 00000000..1ffef600
--- /dev/null
+++ b/website/tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "files": [],
+ "references": [
+ { "path": "./tsconfig.app.json" },
+ { "path": "./tsconfig.node.json" }
+ ]
+}
diff --git a/website/tsconfig.node.json b/website/tsconfig.node.json
new file mode 100644
index 00000000..8455dcbc
--- /dev/null
+++ b/website/tsconfig.node.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
+ "target": "es2023",
+ "lib": ["ES2023"],
+ "types": ["node"],
+ "skipLibCheck": true,
+
+ /* Bundler mode */
+ "module": "nodenext",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "moduleDetection": "force",
+ "noEmit": true,
+
+ /* Linting */
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "erasableSyntaxOnly": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "include": ["vite.config.ts"]
+}
diff --git a/website/vite.config.ts b/website/vite.config.ts
new file mode 100644
index 00000000..0616e595
--- /dev/null
+++ b/website/vite.config.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+import tailwindcss from '@tailwindcss/vite'
+
+export default defineConfig({
+ plugins: [react(), tailwindcss()],
+})