Skip to content

Commit d759c66

Browse files
Update docs of raytrace-parallel (#3026)
1 parent 3da2263 commit d759c66

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

examples/raytrace-parallel/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
online][compiled]
55

66
[dox]: https://rustwasm.github.io/docs/wasm-bindgen/examples/raytrace.html
7-
[compiled]: https://rustwasm.github.io/wasm-bindgen/exbuild/raytrace-parallel/
7+
[compiled]: https://wasm-bindgen.netlify.app/exbuild/raytrace-parallel/
88

99
You can build the example locally with:
1010

guide/src/examples/raytrace.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ through `wasm-pack`, for example.
5252

5353
### Running the demo
5454

55-
Currently it's required to use the `--target no-modules` flag with
56-
`wasm-bindgen` to run threaded code. This is because the WebAssembly file
55+
Currently it's required to use the `--target no-modules` or `--target web` flag
56+
with `wasm-bindgen` to run threaded code. This is because the WebAssembly file
5757
imports memory instead of exporting it, so we need to hook initialization of the
58-
wasm module at this time to provide the appropriate memory object.
58+
wasm module at this time to provide the appropriate memory object. This demo
59+
uses `--target no-modules`, because Firefox does not support modules in workers.
5960

6061
With `--target no-modules` you'll be able to use `importScripts` inside of each
6162
web worker to import the shim JS generated by `wasm-bindgen` as well as calling
@@ -79,10 +80,10 @@ improvements to be made so if you have an idea please file an issue!
7980
synchronization with the main thread.
8081

8182
* Setting up a threaded environment is a bit wonky and doesn't feel smooth
82-
today. For example `--target no-modules` is required with `wasm-bindgen` and
83-
very specific shims are required on both the main thread and worker threads.
84-
These are possible to work with but are somewhat brittle since there's no
85-
standard way to spin up web workers as wasm threads.
83+
today. For example `--target bundler` is unsupported and very specific shims
84+
are required on both the main thread and worker threads. These are possible to
85+
work with but are somewhat brittle since there's no standard way to spin up
86+
web workers as wasm threads.
8687

8788
* There is no standard notion of a "thread". For example the standard library
8889
has no viable route to implement the `std::thread` module. As a consequence

0 commit comments

Comments
 (0)