Skip to content

Commit

Permalink
link to rustwasm doc + cleaner message (through include_str)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Mar 27, 2024
1 parent 7216866 commit eb57930
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
target_arch = "wasm32",
not(web_sys_unstable_apis)
))]
compile_error!("bevy_egui uses unstable APIs to support clipboard on web, please add `--cfg=web_sys_unstable_apis` in your rustflags or disable the `bevy_egui::manage_clipboard` feature.");
compile_error!(include_str!("../static/error_web_sys_unstable_apis.txt"));

/// Egui render node.
#[cfg(feature = "render")]
Expand Down
6 changes: 6 additions & 0 deletions static/error_web_sys_unstable_apis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bevy_egui uses unstable APIs to support clipboard on web.

Please add `--cfg=web_sys_unstable_apis` to your rustflags or disable the `bevy_egui::manage_clipboard` feature.

More Info: https://rustwasm.github.io/wasm-bindgen/web-sys/unstable-apis.html

0 comments on commit eb57930

Please sign in to comment.