summaryrefslogtreecommitdiff
path: root/rust/wasm/src/gpu.rs
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-13 04:40:29 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-13 05:01:51 +0200
commit8230faf082c405c9fd0fa640f4ce2284315782ae (patch)
treee00bf694a83b4d14d6d56942ba89ba92402d854e /rust/wasm/src/gpu.rs
parentdbd68ff1396bf498eb97f095810b78d2bddd0011 (diff)
downloadopencut-8230faf082c405c9fd0fa640f4ce2284315782ae.tar.gz
feat: wasm compositor
Made-with: Cursor
Diffstat (limited to 'rust/wasm/src/gpu.rs')
-rw-r--r--rust/wasm/src/gpu.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/wasm/src/gpu.rs b/rust/wasm/src/gpu.rs
index 70f3a241..4e65978c 100644
--- a/rust/wasm/src/gpu.rs
+++ b/rust/wasm/src/gpu.rs
@@ -21,6 +21,8 @@ thread_local! {
#[wasm_bindgen(js_name = initializeGpu)]
pub async fn initialize_gpu() -> Result<(), JsValue> {
+ console_error_panic_hook::set_once();
+
if GPU_RUNTIME.with(|runtime| runtime.borrow().is_some()) {
return Ok(());
}