From e489dcc9e8f8e76d946592107449b273a3c482c1 Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Sat, 12 Aug 2023 23:05:36 +0200 Subject: [PATCH] webgl feature renamed to webgl2 (#9370) Addresses: ```sh $ cargo build --release --example lighting --target wasm32-unknown-unknown --features webgl error: none of the selected packages contains these features: webgl, did you mean: webgl2, webp? ``` # Objective - When following the instructions for the web examples. - Document clearly the generated file `./target/wasm_example.js`, since it didn't appear on `git grep` (missing extension) ## Solution - Follow the feature rename on the docs. --------- Signed-off-by: Seb Ospina --- docs-template/EXAMPLE_README.md.tpl | 4 ++-- examples/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs-template/EXAMPLE_README.md.tpl b/docs-template/EXAMPLE_README.md.tpl index e0a8eb091e78b..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 webgl +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. diff --git a/examples/README.md b/examples/README.md index 3770750414308..6f53c34f7048c 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 wasm-bindgen --out-name wasm_example \ --out-dir examples/wasm/target \ --target web target/wasm32-unknown-unknown/release/examples/lighting.wasm @@ -515,7 +515,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.