Commit Graph

194 Commits

Author SHA1 Message Date
b3f778096f "Wasm" is a contraction, not an acronym
https://webassembly.github.io/spec/core/intro/introduction.html#wasm
2019-02-26 15:55:09 -08:00
b71f3374c5 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.
2019-02-22 07:50:32 -08:00
b8f080d523 Update idioms of a few examples
* Use `TypedArray::view` now that it exists.
* Don't hack around `instantiateStreaming`
2019-02-19 13:27:30 -08:00
5e7187a95f chore: update pinned Webpack versions 2019-02-15 19:26:08 +01:00
e9f423d57e Bump to 0.2.37 2019-02-15 08:16:24 -08:00
768b654b58 Fix warning on ATOMIC_USIZE_INIT & ATOMIC_BOOL_INIT 2019-02-15 11:58:48 +00:00
802cfedcbd Bump to 0.2.36 2019-02-12 13:19:02 -08:00
d9cf9b3735 Bump to version 0.2.35 2019-02-12 11:36:19 -08:00
894b479213 Migrate wasm-bindgen to using walrus
This commit moves `wasm-bindgen` the CLI tool from internally using
`parity-wasm` for wasm parsing/serialization to instead use `walrus`.
The `walrus` crate is something we've been working on recently with an
aim to replace the usage of `parity-wasm` in `wasm-bindgen` to make the
current CLI tool more maintainable as well as more future-proof.

The `walrus` crate provides a much nicer AST to work with as well as a
structured `Module`, whereas `parity-wasm` provides a very raw interface
to the wasm module which isn't really appropriate for our use case. The
many transformations and tweaks that wasm-bindgen does have a huge
amount of ad-hoc index management to carefully craft a final wasm
binary, but this is all entirely taken care for us with the `walrus`
crate.

Additionally, `wasm-bindgen` will ingest and rewrite the wasm file,
often changing the binary offsets of functions. Eventually with DWARF
debug information we'll need to be sure to preserve the debug
information throughout the transformations that `wasm-bindgen` does
today. This is practically impossible to do with the `parity-wasm`
architecture, but `walrus` was designed from the get-go to solve this
problem transparently in the `walrus` crate itself. (it doesn't today,
but this is planned work)

It is the intention that this does not end up regressing any
`wasm-bindgen` use cases, neither in functionality or in speed. As a
large change and refactoring, however, it's likely that at least
something will arise! We'll want to continue to remain vigilant to any
issues that come up with this commit.

Note that the `gc` crate has been deleted as part of this change, as the
`gc` crate is no longer necessary since `walrus` does it automatically.
Additionally the `gc` crate was one of the main problems with preserving
debug information as it often deletes wasm items!

Finally, this also starts moving crates to the 2018 edition where
necessary since `walrus` requires the 2018 edition, and in general it's
more pleasant to work within the 2018 edition!
2019-02-12 07:25:53 -08:00
078257943d Bump to 0.2.34 2019-02-11 18:58:54 -08:00
5c81125b86 Fixup compiler warnings for Todo MVC example 2019-02-11 18:43:23 +00:00
153acdb4fd Fix webaudio example
The rust set_* functions except numbers, not strings.
2019-01-28 23:54:40 -05:00
78c4075e40 Bump to 0.2.33 2019-01-18 15:32:17 -08:00
32c611d16d Convert all examples to using wasm-pack
This commit migrates all our examples to using `wasm-pack build` to
compile their code and run `wasm-bindgen`. This should make it a bit
easier to understand the examples as there's less to follow during the
build step.

Webpack projects are all using `@wasm-tool/wasm-pack-plugin` as well so
the build step is simple `npm run serve`. Other examples which retain
`build.sh` are just using `wasm-pack build` now
2019-01-17 08:37:32 -08:00
31fdede9fc Bump to 0.2.32 2019-01-16 13:11:13 -08:00
b04f60cf2b Bump to 0.2.31 2019-01-09 09:17:50 -08:00
fbf000a508 Bump to 0.2.30 2019-01-07 07:47:07 -08:00
fcee465692 Add a comment about memory management 2018-12-19 12:00:42 -08:00
08680276ae Fixes outdated links 2018-12-13 15:25:15 +01:00
f29f78e302 [examples] performance - remove one more unnecessary import 2018-12-12 08:16:36 +01:00
a211e4af9c [examples] performance - port to rust 2018 2018-12-12 08:14:08 +01:00
55f199ee77 [examples] paint - port to rust 2018 2018-12-12 08:12:51 +01:00
e1d11fda95 [examples] no_modules - port to rust 2018 2018-12-12 08:11:18 +01:00
dd82cd4722 [examples] julia_set - port to rust 2018 2018-12-12 08:10:02 +01:00
82b322a12f Merge pull request #1103 from T5uku5hi/port-examples-to-rust-2018
Port dom, fetch, guide-supported-types-examples, import_js examples to Rust 2018 edition
2018-12-11 16:37:16 -06:00
b6db977795 removed extern crate lines 2018-12-12 07:14:26 +09:00
0003fc9115 remove unnecessary lines 2018-12-12 06:56:09 +09:00
9aa15bf600 Update wasm2js to rust 2018 2018-12-11 19:31:50 -02:00
bfcecb426e Update raytrace-parallel to rust 2018 2018-12-11 19:28:11 -02:00
7cf2942e25 [examples] import_js - port to rust 2018 2018-12-12 00:53:11 +09:00
56b3e0a318 run cargo fix --edition-idioms 2018-12-12 00:51:23 +09:00
48cc61147b [examples] guide-supported-types-examples - port to rust 2018 2018-12-12 00:50:41 +09:00
2d9dcf6ace run cargo fix --edition-idioms 2018-12-12 00:48:10 +09:00
f148164cd3 [examples] fetch - port to rust 2018 2018-12-12 00:47:22 +09:00
b2afc0e38a run cargo fix --edition-idioms 2018-12-12 00:40:00 +09:00
2c30818b7c Update todomvc example to the 2018 edition 2018-12-11 13:39:36 -02:00
493130ee36 [examples] dom - port to rust 2018 2018-12-12 00:39:22 +09:00
a8fb4c3bf8 Update wasm-in-wasm example to the 2018 edition 2018-12-11 13:36:24 -02:00
00d4c6b5a5 Update webaudio example to the 2018 edition 2018-12-11 13:36:08 -02:00
67c99a8b08 Update webgl example to the 2018 edition 2018-12-11 13:35:48 -02:00
639724a85e Merge pull request #1100 from elpiel/port-examples-to-rust-2018
Port examples - console-log, closures and duck-typed-interfaces to Rust 2018
2018-12-11 08:53:35 -05:00
90ed520394 [examples] closure - remove unnecessary use statement 2018-12-11 14:50:27 +01:00
c6a9d4851a Remove extra web_sys call 2018-12-11 11:50:25 -02:00
ceb269b28a run cargo fix --edition-idioms 2018-12-11 08:53:21 -02:00
573c14118a [examples] duck-typed-interfaces - port to rust 2018 2018-12-11 08:45:26 +01:00
7107a896da [examples] closures - port to rust 2018 2018-12-11 08:39:49 +01:00
26737a2888 [examples] console_log - port to rust 2018 2018-12-11 08:37:53 +01:00
88c8b9059e Add edition 2018 to Cargo.toml 2018-12-10 23:44:59 -02:00
77ddf5ebcd examples: Add a requestAnimationFrame loop example 2018-12-10 12:50:19 -08:00
63e3ba722d Bump to 0.2.29 2018-12-04 06:04:47 -08:00