Don't use rayon in examples on wasm

This commit is contained in:
Liam Murphy 2022-02-23 19:13:26 +11:00
parent d735510f72
commit 7b4717fdc4
3 changed files with 21 additions and 3 deletions

View file

@ -37,6 +37,16 @@ version = "0.3.55"
features = ["CanvasRenderingContext2d", "Document", "Element", "HtmlCanvasElement", "ImageData", "Window"]
[dev-dependencies]
instant = "0.1.12"
winit = "0.26.1"
[dev-dependencies.image]
version = "0.23.14"
# Disable rayon on web
default-features = false
features = ["jpeg"]
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
# Turn rayon back on everywhere else; creating the separate entry resets the features to default.
image = "0.23.14"
rayon = "1.5.1"