egui_node_graph icon indicating copy to clipboard operation
egui_node_graph copied to clipboard

Cant Compile to web

Open asgore-undertale opened this issue 2 years ago • 1 comments

Im facing this error when i try to compile the node editor to web: error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> egui_node_graph_example\src\lib.rs:22:5 | 22 | eframe::start_web(canvas_id, Box::new(app)) | ^^^^^^^^^^^^^^^^^-------------------------- an argument of type Box<(dyn for<'r, 's> FnOnce(&'r CreationContext<'s>) -> Box<(dyn App + 'static)> + 'static)> is missing | note: expected struct WebOptions, found struct Box --> egui_node_graph_example\src\lib.rs:22:34 | 22 | eframe::start_web(canvas_id, Box::new(app)) | ^^^^^^^^^^^^^ = note: expected struct WebOptions found struct Box<NodeGraphExample> note: function defined here --> C:\Users\2021.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.19.0\src\lib.rs:112:8 | 112 | pub fn start_web( | ^^^^^^^^^ help: provide the argument | 22 | eframe::start_web(canvas_id, /* WebOptions /, / Box<(dyn for<'r, 's> FnOnce(&'r CreationContext<'s>) -> Box<(dyn App + 'static)> + 'static)> */) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types --> egui_node_graph_example\src\lib.rs:22:5 | 20 | pub fn start(canvas_id: &str) -> Result<(), eframe::wasm_bindgen::JsValue> { | ----------------------------------------- expected Result<(), JsValue> because of return type 21 | let app = NodeGraphExample::default(); 22 | eframe::start_web(canvas_id, Box::new(app)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct Arc | = note: expected enum Result<(), _> found enum Result<Arc<eframe::egui::mutex::Mutex<AppRunner>>, _>

Some errors have detailed explanations: E0061, E0308. For more information about an error, try rustc --explain E0061. error: could not compile egui_node_graph_example due to 2 previous errors

asgore-undertale avatar Apr 15 '23 18:04 asgore-undertale

I created a PR #107 that fixes web support in the example app.

Neopallium avatar Sep 23 '23 14:09 Neopallium