Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-unknown-unknown]
rustflags = ["--cfg", "web_sys_unstable_apis"]
6 changes: 6 additions & 0 deletions .github/workflows/nannou.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,17 @@ jobs:
profile: minimal
toolchain: stable
override: true
target: wasm32-unknown-unknown
- name: Run check
uses: actions-rs/cargo@v1
with:
command: check
args: --examples --verbose
- name: Check nannou package builds against wasm32-unknown-unknown
uses: actions-rs/cargo@v1
with:
command: build
args: -p nannou --features wasm-experimental --target wasm32-unknown-unknown

cargo-publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
Expand Down
3 changes: 3 additions & 0 deletions nannou/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ edition = "2018"
[dependencies]
find_folder = "0.3"
futures = { version = "0.3", features = ["executor", "thread-pool"] }
getrandom = "0.2.3"
image = "0.23"
instant = "0.1.9"
lyon = "0.17"
Expand All @@ -36,3 +37,5 @@ winit = "0.26"
default = ["notosans"]
# Enables SPIR-V support in the `wgpu` module.
spirv = ["nannou_wgpu/spirv"]
# Enables experimental WASM compilation for CI-use only
wasm-experimental = ["getrandom/js"]