Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard feature will not compile, web-sys API change #300

Closed
xangelix opened this issue Aug 13, 2024 · 2 comments
Closed

Clipboard feature will not compile, web-sys API change #300

xangelix opened this issue Aug 13, 2024 · 2 comments

Comments

@xangelix
Copy link

The web-sys clipboard API is now a bit different, see:

rustwasm/wasm-bindgen#3992

error[E0308]: mismatched types
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_egui-0.28.0/src/web_clipboard.rs:233:13
    |
233 |         let Some(clipboard) = nav.clipboard() else {
    |             ^^^^^^^^^^^^^^^   --------------- this expression has type `Clipboard`
    |             |
    |             expected `Clipboard`, found `Option<_>`
    |
    = note: expected struct `Clipboard`
                 found enum `std::option::Option<_>`

For more information about this error, try `rustc --explain E0308`.
@rapushka
Copy link

does anyone know a workaround for this?

i'm using this template for my project and i'm unable to build wasm due to this error, but i only need egui for debug builds! i use it as a dependency for bevy editor pls, and so i don't need it in my wasm builds at all!

[dependencies]
bevy_editor_pls = "0.9"

i tried to put this one in [dev-dependencies] but it doesn't work, cuz as far as i understand it can't work with binary projects

@vladbat00
Copy link
Owner

Thank you for the report! The fix is released in the 0.29 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants