From a730b6e467104e0dca3bae7c48e4b867a1e429cf Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Sun, 6 Aug 2023 10:15:53 +0200 Subject: [PATCH 1/5] webgl feature renamed to webgl2 error: none of the selected packages contains these features: webgl, did you mean: webgl2, webp? --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 3770750414308..801860d906a45 100644 --- a/examples/README.md +++ b/examples/README.md @@ -507,7 +507,7 @@ Following is an example for `lighting`. For other examples, change the `lighting following commands. ```sh -cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl +cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl2 wasm-bindgen --out-name wasm_example \ --out-dir examples/wasm/target \ --target web target/wasm32-unknown-unknown/release/examples/lighting.wasm From 48eb7fd38b5ca69143cb0cd02999170ee932b9f8 Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Sun, 6 Aug 2023 10:43:47 +0200 Subject: [PATCH 2/5] Updating example readme template for webgl2 feature rename Signed-off-by: Seb Ospina --- docs-template/EXAMPLE_README.md.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-template/EXAMPLE_README.md.tpl b/docs-template/EXAMPLE_README.md.tpl index e0a8eb091e78b..5266cbdd203b4 100644 --- a/docs-template/EXAMPLE_README.md.tpl +++ b/docs-template/EXAMPLE_README.md.tpl @@ -210,7 +210,7 @@ Following is an example for `lighting`. For other examples, change the `lighting following commands. ```sh -cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl +cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl2 wasm-bindgen --out-name wasm_example \ --out-dir examples/wasm/target \ --target web target/wasm32-unknown-unknown/release/examples/lighting.wasm From e3d95eda9e8ab8cf1446b721ed3c5a9292d9b9ce Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Mon, 7 Aug 2023 17:15:02 +0200 Subject: [PATCH 3/5] Webgl2 feature is now default, adding clearer instructions for how the referenced file wasm_example.js is generated --- docs-template/EXAMPLE_README.md.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs-template/EXAMPLE_README.md.tpl b/docs-template/EXAMPLE_README.md.tpl index 5266cbdd203b4..05e2f26b87a33 100644 --- a/docs-template/EXAMPLE_README.md.tpl +++ b/docs-template/EXAMPLE_README.md.tpl @@ -210,7 +210,7 @@ Following is an example for `lighting`. For other examples, change the `lighting following commands. ```sh -cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl2 +cargo build --release --example lighting --target wasm32-unknown-unknown wasm-bindgen --out-name wasm_example \ --out-dir examples/wasm/target \ --target web target/wasm32-unknown-unknown/release/examples/lighting.wasm @@ -218,7 +218,7 @@ wasm-bindgen --out-name wasm_example \ The first command will build the example for the wasm target, creating a binary. Then, [wasm-bindgen-cli](https://rustwasm.github.io/wasm-bindgen/reference/cli.html) is used to create -javascript bindings to this wasm file, which can be loaded using this +javascript bindings to this wasm file in the output file `examples/wasm/target/wasm_example.js`, which can be loaded using this [example HTML file](./wasm/index.html). Then serve `examples/wasm` directory to browser. i.e. From c27378ed025b90a602c1f4129ca155e0b793b6bf Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Mon, 7 Aug 2023 17:19:15 +0200 Subject: [PATCH 4/5] Webgl2 feature is now default, adding clearer instructions on how to get the file wasm_example.js --- examples/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/README.md b/examples/README.md index 801860d906a45..12fccbda6ace0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -507,15 +507,14 @@ Following is an example for `lighting`. For other examples, change the `lighting following commands. ```sh -cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl2 +cargo build --release --example lighting --target wasm32-unknown-unknown wasm-bindgen --out-name wasm_example \ --out-dir examples/wasm/target \ --target web target/wasm32-unknown-unknown/release/examples/lighting.wasm ``` The first command will build the example for the wasm target, creating a binary. Then, -[wasm-bindgen-cli](https://rustwasm.github.io/wasm-bindgen/reference/cli.html) is used to create -javascript bindings to this wasm file, which can be loaded using this +[wasm-bindgen-cli](https://rustwasm.github.io/wasm-bindgen/reference/cli.html) is used to create javascript bindings to this wasm file in the output file `examples/wasm/target/wasm_example.js`, which can be loaded using this [example HTML file](./wasm/index.html). Then serve `examples/wasm` directory to browser. i.e. From 921532a97a0a85eca2e1a39c7f8a2b6daf21167c Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Mon, 7 Aug 2023 20:58:44 +0200 Subject: [PATCH 5/5] Missed the cargo run -p build-template-pages Signed-off-by: Seb Ospina --- examples/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 12fccbda6ace0..6f53c34f7048c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -514,7 +514,8 @@ wasm-bindgen --out-name wasm_example \ ``` The first command will build the example for the wasm target, creating a binary. Then, -[wasm-bindgen-cli](https://rustwasm.github.io/wasm-bindgen/reference/cli.html) is used to create javascript bindings to this wasm file in the output file `examples/wasm/target/wasm_example.js`, which can be loaded using this +[wasm-bindgen-cli](https://rustwasm.github.io/wasm-bindgen/reference/cli.html) is used to create +javascript bindings to this wasm file in the output file `examples/wasm/target/wasm_example.js`, which can be loaded using this [example HTML file](./wasm/index.html). Then serve `examples/wasm` directory to browser. i.e.