From ffedb82c8917d1e0c6afbc5772724c41eca65642 Mon Sep 17 00:00:00 2001 From: Nitish C <86357181+Nitish-bot@users.noreply.github.com> Date: Mon, 12 Jan 2026 20:07:56 +0530 Subject: [PATCH 1/3] fix: add config param to wasm init function --- crates/processing_render/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/processing_render/src/lib.rs b/crates/processing_render/src/lib.rs index d4b482e..6f60575 100644 --- a/crates/processing_render/src/lib.rs +++ b/crates/processing_render/src/lib.rs @@ -293,7 +293,7 @@ pub fn init(config: Config) -> error::Result<()> { /// Initialize the app asynchronously #[cfg(target_arch = "wasm32")] -pub async fn init() -> error::Result<()> { +pub async fn init(config: Config) -> error::Result<()> { use bevy::app::PluginsState; setup_tracing()?; @@ -301,7 +301,7 @@ pub async fn init() -> error::Result<()> { return Ok(()); } - let mut app = create_app(); + let mut app = create_app(config); // we need to avoid blocking the main thread while waiting for plugins to initialize while app.plugins_state() == PluginsState::Adding { From 68a4c97d790b23e0f097048e24cc741ddf2f7124 Mon Sep 17 00:00:00 2001 From: Nitish C <86357181+Nitish-bot@users.noreply.github.com> Date: Mon, 12 Jan 2026 20:43:50 +0530 Subject: [PATCH 2/3] fix: missed the bindgen --- crates/processing_wasm/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/processing_wasm/src/lib.rs b/crates/processing_wasm/src/lib.rs index b74a1d0..407e27d 100644 --- a/crates/processing_wasm/src/lib.rs +++ b/crates/processing_wasm/src/lib.rs @@ -2,9 +2,7 @@ use bevy::prelude::Entity; use processing_render::{ - exit, graphics_begin_draw, graphics_end_draw, graphics_flush, graphics_record_command, - image_create, image_destroy, image_load, image_readback, image_resize, init, - render::command::DrawCommand, surface_create_from_canvas, surface_destroy, surface_resize, + config::Config, exit, graphics_begin_draw, graphics_end_draw, graphics_flush, graphics_record_command, image_create, image_destroy, image_load, image_readback, image_resize, init, render::command::DrawCommand, surface_create_from_canvas, surface_destroy, surface_resize }; use wasm_bindgen::prelude::*; @@ -19,7 +17,8 @@ fn wasm_start() { #[wasm_bindgen(js_name = "init")] pub async fn js_init() -> Result<(), JsValue> { - check(init().await) + let config = Config::new(); + check(init(config).await) } #[wasm_bindgen(js_name = "createSurface")] From 3115ad32f95fdd408ef8e2cccf54ad9d37fcfae5 Mon Sep 17 00:00:00 2001 From: Nitish C <86357181+Nitish-bot@users.noreply.github.com> Date: Mon, 12 Jan 2026 20:49:26 +0530 Subject: [PATCH 3/3] fmt --- crates/processing_wasm/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/processing_wasm/src/lib.rs b/crates/processing_wasm/src/lib.rs index 407e27d..53c3bda 100644 --- a/crates/processing_wasm/src/lib.rs +++ b/crates/processing_wasm/src/lib.rs @@ -2,7 +2,10 @@ use bevy::prelude::Entity; use processing_render::{ - config::Config, exit, graphics_begin_draw, graphics_end_draw, graphics_flush, graphics_record_command, image_create, image_destroy, image_load, image_readback, image_resize, init, render::command::DrawCommand, surface_create_from_canvas, surface_destroy, surface_resize + config::Config, exit, graphics_begin_draw, graphics_end_draw, graphics_flush, + graphics_record_command, image_create, image_destroy, image_load, image_readback, image_resize, + init, render::command::DrawCommand, surface_create_from_canvas, surface_destroy, + surface_resize, }; use wasm_bindgen::prelude::*;