29 releases

0.6.2 Jan 30, 2023
0.6.0 Nov 24, 2022
0.5.0 Nov 12, 2021
0.4.0 Mar 28, 2021
0.0.2 Feb 22, 2019

#226 in Graphics APIs

Download history 683/week @ 2023-12-11 879/week @ 2023-12-18 534/week @ 2023-12-25 469/week @ 2024-01-01 803/week @ 2024-01-08 789/week @ 2024-01-15 695/week @ 2024-01-22 519/week @ 2024-01-29 684/week @ 2024-02-05 752/week @ 2024-02-12 762/week @ 2024-02-19 951/week @ 2024-02-26 875/week @ 2024-03-04 907/week @ 2024-03-11 1065/week @ 2024-03-18 1101/week @ 2024-03-25

4,026 downloads per month
Used in 60 crates (2 directly)

MIT/Apache

395KB
4.5K SLoC

Running the examples

Ensure both cargo and npm are installed.

Make sure that wasm-pack is installed:

$ cargo install wasm-pack

Then run the following:

$ cd examples/basic && ./build.sh

Then navigate your browser to the local web server that was started.

Testing

The easiest way is to use wasm-pack:

$ cargo install wasm-pack

Then use wasm-pack to run the tests:

$ wasm-pack test --chrome --headless

Tests are currently run only against chrome, once tests are made less brittle we'll also run against other browsers.

References:


lib.rs:

The Web Canvas backend for the Piet 2D graphics abstraction.

Dependencies

~10MB
~195K SLoC