diff --git a/README.md b/README.md index a904dc6915..281f894cc8 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ cargo run --example hello-compute 1 2 3 4 #### Run Examples on the Web (`wasm32-unknown-unknown`) +Running on the web is still work-in-progress. You may need to enable experimental flags on your browser. Check browser implementation status on [webgpu.io](https://webgpu.io). + To run examples on the `wasm32-unknown-unknown` target, first build the example as usual, then run `wasm-bindgen`: ```bash @@ -46,6 +48,27 @@ RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --target wasm32-unknown-unknow wasm-bindgen --out-dir target/generated --web target/wasm32-unknown-unknown/debug/examples/hello-triangle.wasm ``` +Create an `index.html` file into `target/generated` directory and add the following code: + +```html + +
+ + + +