Debian Codegraph @

.cargo/vendor/wasm-bindgen/guide/src/reference/browser-support.md

raw
1 # Supported Browsers
2
3 The output of `wasm-bindgen` includes a JS file, and as a result it's good to
4 know what browsers that file is expected to be used in! By default the output
5 uses ES modules with Wasm imports which isn't implemented in browsers today,
6 but when using a bundler (like Webpack) or `--target web` you should be able
7 to produce output suitable for all browsers.
8
9 Firefox, Chrome, Safari, and Edge browsers are all supported by
10 `wasm-bindgen`. If you find a problem in one of these browsers please [report
11 it] as we'd like to fix the bug! If you find a bug in another browser we would
12 also like to be aware of it!
13
14 ## Caveats
15
16 * **IE 11** - `wasm-bindgen` by default requires support for
17 `WebAssembly`, but no version of IE currently supports `WebAssembly`. You can
18 support IE by [compiling wasm files to JS using `wasm2js`][w2js] (you can [see
19 an example of doing this too](../examples/wasm2js.html)). Note
20 that at this time no bundler will do this by default, but we'd love to
21 document plugins which do this if you are aware of one!
22
23 If you find other incompatibilities please report them to us! We'd love to
24 either keep this list up-to-date or fix the underlying bugs :)
25
26 [report it]: https://github.com/rustwasm/wasm-bindgen/issues/new
27 [w2js]: https://github.com/WebAssembly/binaryen