iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
24.08k stars 1.12k forks source link

Can't build tour example for wasm32, pulling in net2 as dependency #145

Closed tarkah closed 4 years ago

tarkah commented 4 years ago

When trying to build the tour example for wasm32 cargo build --example tour --target wasm32-unknown-unknown, I am getting a compilation error due to it trying to compile the net2 library. This dependency appears to be pulled in by window_clipboard in iced_winit, which seems like a relatively recent addition.

window_clipboard v0.1.0-alpha.2 (https://github.com/hecrj/window_clipboard?rev=22c6dd6c04cd05d528029b50a30c56417cd4bebf#22c6dd6c)
├── clipboard_wayland v0.1.0-alpha (https://github.com/hecrj/window_clipboard?rev=22c6dd6c04cd05d528029b50a30c56417cd4bebf#22c6dd6c)
│   └── smithay-clipboard v0.3.6
│       └── smithay-client-toolkit v0.6.4
│           ├── wayland-client v0.23.6
│           │   ├── calloop v0.4.4
│           │   │   ├── mio v0.6.21
│           │   │   │   ├── net2 v0.2.33
hecrj commented 4 years ago

This is a duplicate of #142. I should add a note in the iced_web readme.

window_clipboard is only used in iced_native, though. The issue is most likely in a dev dependency, probably async-std.

tarkah commented 4 years ago

Ahh, sorry for opening a duplicate issue. Thanks for the clarification. I'll wait for the 0.1.0 release.

hecrj commented 4 years ago

No worries! Duplicate issues are fine!

There is a big native PR landing soon, I'll try to get iced_web up to speed soon after that!

tarkah commented 4 years ago

Awesome! Thanks so much for your work on this crate. I really like the direction this project is going and can't wait to see where it goes.