eframe: warn if web_sys_unstable_apis was not set

This commit is contained in:
Emil Ernerfeldt 2022-11-07 14:00:00 +01:00
parent d5eb8779cb
commit b3ab47a594

View file

@ -526,6 +526,11 @@ pub async fn start(
web_options: crate::WebOptions,
app_creator: epi::AppCreator,
) -> Result<AppRunnerRef, JsValue> {
#[cfg(not(web_sys_unstable_apis))]
tracing::warn!(
"eframe compiled without RUSTFLAGS='--cfg=web_sys_unstable_apis'. Copying text won't work."
);
let mut runner = AppRunner::new(canvas_id, web_options, app_creator).await?;
runner.warm_up()?;
start_runner(runner)