From 39ce1e4111b366ee1d4e13aafb5fc75da2ce3afe Mon Sep 17 00:00:00 2001 From: Eduardo Robles Elvira Date: Fri, 23 Sep 2022 12:01:56 +0200 Subject: [PATCH] Fixing wasm README The README referred to localhost url, but it turns out that it doesn't work and it requires using 127.0.0.1 instead. --- src/wasm/test/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wasm/test/README.md b/src/wasm/test/README.md index 89fdc86..fe02dbb 100644 --- a/src/wasm/test/README.md +++ b/src/wasm/test/README.md @@ -9,14 +9,14 @@ SPDX-License-Identifier: AGPL-3.0-only * install [webpack](https://rustwasm.github.io/wasm-pack/installer/) * `wasm-pack build --out-name index --release --target web --features=wasmtest` * `python3 src/wasm/test/serve.py` -* http://localhost:8080/src/wasm/test/test.html +* http://127.0.0.1:8080/src/wasm/test/test.html ## Test wasm build with no workers * install [webpack](https://rustwasm.github.io/wasm-pack/installer/) * `wasm-pack build --out-name index --release --target web --features=wasmtest` * `python3 src/wasm/test/serve.py` -* http://localhost:8080/src/wasm/test/test_noworkers.html +* http://127.0.0.1:8080/src/wasm/test/test_noworkers.html ### Test wasm build with multithreading @@ -28,7 +28,7 @@ rustup run nightly-2022-04-07 wasm-pack build --out-name index --release --rele --features=wasmtest,wasmrayon -- -Z build-std=panic_abort,std ``` * `python3 src/wasm/test/serve.py` -* http://localhost:8080/src/wasm/test/test.html?threaded=true +* http://127.0.0.1:8080/src/wasm/test/test.html?threaded=true In order for this test to work the browser must have [cross origin isolation](https://web.dev/cross-origin-isolation-guide/) enabled. This requires sending the appropriate headers (see serve.py) and cannot work without https unless testing on localhost.