diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index b4048943..852c6866 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -17,6 +17,7 @@ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"] # Avoid speech-dispatcher dependencies - see https://docs.rs/crate/eframe/0.20.0/builds/695200 no-default-features = true features = ["document-features", "glow", "wgpu", "persistence", "wgpu"] +targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [lib] diff --git a/crates/eframe/src/epi.rs b/crates/eframe/src/epi.rs index 5fdcb33b..7ebcb5c1 100644 --- a/crates/eframe/src/epi.rs +++ b/crates/eframe/src/epi.rs @@ -74,7 +74,7 @@ pub trait App { /// /// Can be used from web to interact or other external context. /// - /// You need to implement this if you want to be able to access the application from JS using [`AppRunner::app_mut`]. + /// You need to implement this if you want to be able to access the application from JS using [`crate::web::backend::AppRunner`]. /// /// This is needed because downcasting `Box` -> `Box` to get &`ConcreteApp` is not simple in current rust. /// diff --git a/crates/eframe/src/web/backend.rs b/crates/eframe/src/web/backend.rs index 191709c3..e939995d 100644 --- a/crates/eframe/src/web/backend.rs +++ b/crates/eframe/src/web/backend.rs @@ -1,12 +1,13 @@ -use super::{web_painter::WebPainter, *}; -use crate::epi; - use egui::{ mutex::{Mutex, MutexGuard}, TexturesDelta, }; pub use egui::{pos2, Color32}; +use crate::{epi, App}; + +use super::{web_painter::WebPainter, *}; + // ---------------------------------------------------------------------------- /// Data gathered between frames. @@ -284,7 +285,7 @@ impl AppRunner { /// Get mutable access to the concrete [`App`] we enclose. /// /// This will panic if your app does not implement [`App::as_any_mut`]. - pub fn app_mut(&mut self) -> &mut ConreteApp { + pub fn app_mut(&mut self) -> &mut ConreteApp { self.app .as_any_mut() .expect("Your app must implement `as_any_mut`, but it doesn't")