I built with cargo build --bin clock --target wasm32-unknown-unknown following the guide. However the compiler gave an error:
error[E0432]: unresolved imports `iced::canvas`, `iced::canvas`, `iced::time`
--> clock/src/main.rs:3:5
|
3 | canvas::{self, Cache, Canvas, Cursor, Geometry, LineCap, Path, Stroke},
| ^^^^^^ ^^^^ no `canvas` in the root
| |
| could not find `canvas` in `iced`
4 | executor, time, Application, Color, Command, Container, Element, Length,
| ^^^^ no `time` in the root
For more information about this error, try `rustc --explain E0432`.
error: could not compile `clock` due to previous error
Am I doing something wrong? Or is canvas not supported over wasm yet?
I have copied&pasted the clock example into a binary crate with the following Cargo manifest.
I built with
cargo build --bin clock --target wasm32-unknown-unknown
following the guide. However the compiler gave an error:Am I doing something wrong? Or is canvas not supported over wasm yet?