Remove the exposed web feature (#304)

- The `web` feature was previously exposed by the example crate. This isn't really necessary.
- See #276 for discussion
This commit is contained in:
Jay Oster 2022-08-19 14:00:54 -07:00 committed by GitHub
parent 6605951d8c
commit 881033c5c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -7,13 +7,11 @@ publish = false
[features] [features]
optimize = ["log/release_max_level_warn"] optimize = ["log/release_max_level_warn"]
web = ["wgpu/webgl"]
default = ["optimize"] default = ["optimize"]
[dependencies] [dependencies]
log = "0.4" log = "0.4"
pixels = { path = "../.." } pixels = { path = "../.." }
wgpu = "0.13"
winit = "0.26" winit = "0.26"
winit_input_helper = "0.12" winit_input_helper = "0.12"
@ -23,6 +21,7 @@ console_log = "0.2"
wasm-bindgen = "0.2" wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4" wasm-bindgen-futures = "0.4"
web-sys = "0.3" web-sys = "0.3"
wgpu = { version = "0.13", features = ["webgl"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = "0.9" env_logger = "0.9"

View file

@ -4,7 +4,7 @@ serve package: (build package)
build package: build package:
mkdir -p ./target/{{package}}/ mkdir -p ./target/{{package}}/
cp ./examples/{{package}}/index.html ./target/{{package}}/ cp ./examples/{{package}}/index.html ./target/{{package}}/
cargo build --release --package {{package}} --target wasm32-unknown-unknown --features web cargo build --release --package {{package}} --target wasm32-unknown-unknown
wasm-bindgen --target web --no-typescript --out-dir ./target/{{package}}/ ./target/wasm32-unknown-unknown/release/{{package}}.wasm wasm-bindgen --target web --no-typescript --out-dir ./target/{{package}}/ ./target/wasm32-unknown-unknown/release/{{package}}.wasm
clean package: clean package: