Tweak introductory and deployment documentation.

This commit rejiggers some documentation of `wasm-bindgen` in a few
significant ways:

* The main landing page now has text and links to the Game of Life
  tutorial and `wasm-pack`.
* The "whirlwind tour" was deleted as it wasn't really serving any
  purpose that the Game of Life plus the later references weren't already
  serving.
* The "no modules" example was renamed to "without a bundler"
* A dedicated section on "Deployment" was added which replaces the
  previous "No ES Modules" page. This is hopefully more descriptive and
  also prominently mentions the various options for deployment.
This commit is contained in:
Alex Crichton
2019-02-21 11:49:08 -08:00
parent 74a39ce618
commit b71f3374c5
18 changed files with 189 additions and 532 deletions

View File

@ -4,13 +4,19 @@ This subsection contains examples of using the `wasm-bindgen`, `js-sys`, and
`web-sys` crates. Each example should have more information about what it's
doing.
The source code for all examples can also be [found online][code] to download an
run locally. Most examples are configured with Webpack/`wasm-pack` and can
These examples all assume familiarity with `wasm-bindgen`, `wasm-pack`, and
building a Rust and WebAssembly project. If you're unfamiliar with these check
out the [Game of Life tutorial][gol] to help you get started.
The source code for all examples can also be [found online][code] to download
and run locally. Most examples are configured with Webpack/`wasm-pack` and can
be built with `npm run serve`. Other examples which don't use Webpack are
accompanied with a `build.sh` showing how to build it.
Note that most examples currently use Webpack to assemble the final output
artifact, but this is not required! You can use the bundler of choice,
`--no-modules`, or native browser ESM support as alternatives to Webpack.
artifact, but this is not required! You can review the [deployment
documentation][deploy] for other options of how to deploy Rust and WebAssembly.
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples
[gol]: https://rustwasm.github.io/book/
[deploy]: ../reference/deployment.html