2019-02-21 11:49:08 -08:00
|
|
|
# Without a Bundler
|
2018-04-19 07:20:35 -07:00
|
|
|
|
2018-09-20 16:20:42 -07:00
|
|
|
[View documentation for this example online][dox]
|
|
|
|
|
2019-05-26 16:43:00 +09:00
|
|
|
[dox]: https://rustwasm.github.io/docs/wasm-bindgen/examples/without-a-bundler.html
|
2018-04-19 07:20:35 -07:00
|
|
|
|
|
|
|
You can build the example locally with:
|
|
|
|
|
|
|
|
```
|
2019-03-19 11:25:13 -07:00
|
|
|
$ wasm-pack build --target web
|
2018-04-19 07:20:35 -07:00
|
|
|
```
|
2018-09-20 16:20:42 -07:00
|
|
|
|
2020-04-28 20:16:17 +02:00
|
|
|
Then serve this directory in your favourite webserver and navigate to `host:port`
|
|
|
|
to open the index.html in your browser:
|
|
|
|
|
|
|
|
```
|
|
|
|
# static server from https://crates.io/crates/https
|
|
|
|
http
|
|
|
|
|
|
|
|
# or use python
|
|
|
|
python2 -m SimpleHTTPServer
|
|
|
|
python3 -m http.server
|
|
|
|
```
|