Commit Graph

2331 Commits

Author SHA1 Message Date
8f695782fb Merge pull request #1278 from alexcrichton/examples
Update idioms of a few examples
2019-02-19 16:14:32 -06:00
e66de7b866 Merge pull request #1277 from alexcrichton/upgrade-walrus
Upgrade to walrus 0.4
2019-02-19 16:14:12 -06:00
8fb705a1ef Upgrade to walrus 0.4
Also be sure to have an explicit GC pass!
2019-02-19 14:14:01 -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
5b0cfd7cea Merge pull request #1274 from alexcrichton/delete-once
Fix an assert while deleting table elements
2019-02-19 10:21:25 -08:00
32b72a3ae0 Merge pull request #1275 from alexcrichton/option-classes
Support `Option<RustStruct>` in arguments/returns
2019-02-19 10:20:40 -08:00
f831711f5d Support Option<RustStruct> in arguments/returns
Add all the necessary support in a few locations and we should be good
to go!

Closes #1252
2019-02-19 09:08:37 -08:00
9bab9d4af1 Fix an assert while deleting table elements
LLVM's mergefunc pass may mean that the same descriptor function is used
for different closure invocation sites even when the closure itself is
different. This typically only happens with LTO but in theory could
happen at any time!

The assert was tripping when we tried to delete the same function table
entry twice, so instead of a `Vec<usize>` of entries to delete this
commit switches to a `HashSet<usize>` which should do the deduplication
for us and enusre that we delete each descriptor only once.

Closes #1264
2019-02-19 08:17:14 -08:00
e498d99b2d Merge pull request #1266 from ctjhoa/master
Fix missing link on todomvc example
2019-02-19 09:13:47 -06:00
eda7541e45 Fix missing link on todomvc example 2019-02-17 16:19:23 +00:00
9e40a6d02b Merge pull request #1263 from alexcrichton/revert
Revert "Temporarily unconditionally remove producers section"
2019-02-15 14:29:02 -06:00
a3c03b5265 Revert "Temporarily unconditionally remove producers section"
This reverts commit f0cd51a566.
2019-02-15 11:22:46 -08:00
ebc0f1c07e Merge pull request #1261 from xtuc/chore-update-webpack
update pinned Webpack versions
2019-02-15 13:22:12 -06:00
f0c9ed4c6e feat: update root package 2019-02-15 19:43:36 +01:00
5c9ae21e76 chore: update root package 2019-02-15 19:28:05 +01:00
5e7187a95f chore: update pinned Webpack versions 2019-02-15 19:26:08 +01:00
e9f423d57e Bump to 0.2.37 0.2.37 2019-02-15 08:16:24 -08:00
4dcaa79ba6 Merge pull request #1260 from alexcrichton/no-producers
Temporarily unconditionally remove producers section
2019-02-15 10:12:17 -06:00
f0cd51a566 Temporarily unconditionally remove producers section
We've had a lot of bug reports with upstream webpack currently and while
webpack has a fix it may take a moment to deploy. Let's try and fix
wasm-bindgen in the meantime!

Once webpack is updated we can go back to emitting a producers section
by default and publish a new version of wasm-bindgen.
2019-02-15 07:39:42 -08:00
632a2b2979 Merge pull request #1259 from ctjhoa/master
Fix warning on ATOMIC_USIZE_INIT & ATOMIC_BOOL_INIT
2019-02-15 08:59:24 -06:00
c57e2b0baf Merge pull request #1256 from alexcrichton/remove-producers
Add a flag to remove producers section
2019-02-15 08:59:03 -06:00
768b654b58 Fix warning on ATOMIC_USIZE_INIT & ATOMIC_BOOL_INIT 2019-02-15 11:58:48 +00:00
5e3cedfaf2 Add a flag to remove producers section
This should help handle instances like the recent Webpack bug and is
also a useful flag in its own right. For now it's set to `false`, but if
the Webpack bug persists through to tomorrow we likely want to publish a
version of `wasm-bindgen` with it default set to `true`.
2019-02-14 10:08:24 -08:00
7c7acf2aa6 Merge pull request #1255 from fitzgen/configure-walrus
Configure walrus to generate DWARF/names at the right times
2019-02-14 10:19:14 -06:00
17dc79e4c5 Configure walrus to generate DWARF/names at the right times
Fixes ##1254
2019-02-14 07:20:43 -08:00
c49b87b2d8 Merge pull request #1225 from Pauan/get_index
Adding in Reflect::get_f64, Reflect::get_u32, Reflect::set_f64, and Reflect::set_u32
2019-02-13 13:10:40 -06:00
8ead8a1b62 Merge pull request #1248 from selaux/add-srcObject-to-HTMLMediaElement
[HTMLMediaElement] Reintroduce srcObject
2019-02-13 13:00:57 -06:00
61243b3014 Merge pull request #1245 from fitzgen/fix-issue-1244
Fix issue 1244
2019-02-12 13:32:22 -08:00
802cfedcbd Bump to 0.2.36 0.2.36 2019-02-12 13:19:02 -08:00
f20afebdd1 Don't need the old wasm-bindgen-gc crate's Cargo.toml either 2019-02-12 13:16:17 -08:00
6f00d9563f interpreter: handle closure descriptors with less than two parameters
This might happen because of LTO.

Fixes #1244
2019-02-12 12:57:22 -08:00
51989aed88 No more wasm-bindgen-gc crate, so we don't need to publish it! 2019-02-12 12:44:45 -08:00
d9cf9b3735 Bump to version 0.2.35 0.2.35 2019-02-12 11:36:19 -08:00
82b7bdeb93 Fix wasm-interpreter tests 2019-02-12 10:46:43 -08:00
db4c3bf77b Merge pull request #1243 from fitzgen/instantiateStreaming-fallback-round-2
Apply the `instantiateStreaming` incorrect MIME type recovery for no-modules
2019-02-12 12:45:46 -06:00
b858875d49 Apply the instantiateStreaming incorrect MIME type recovery for no-modules
It was incorrectly only enabled for the multithreading glue previously.
2019-02-12 10:41:53 -08:00
6004454775 Merge pull request #1237 from alexcrichton/walrus
Migrate `wasm-bindgen` to using `walrus`
2019-02-12 09:26:46 -06: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
c30dbc3179 Write changelog entry for 0.2.34 0.2.34 2019-02-11 19:11:08 -08:00
078257943d Bump to 0.2.34 2019-02-11 18:58:54 -08:00
92ed368c0a Merge pull request #1238 from jonathanKingston/fixup_todomvc_warnings
Fixup compiler warnings for Todo MVC example
2019-02-11 13:25:36 -06:00
5c81125b86 Fixup compiler warnings for Todo MVC example 2019-02-11 18:43:23 +00:00
311dafd366 Merge pull request #1235 from fitzgen/some-little-things
A couple small improvements
2019-02-11 06:39:09 -06:00
f6362a653c Merge pull request #1234 from stevebob/guide-fix-broken-links
Fix broken links
2019-02-10 20:45:18 +01:00
4975ca2954 Don't give up when servers don't set the application/wasm MIME type
It is quite annoying when using `python -m SimpleHTTPServer` or equivalent.
2019-02-10 13:59:39 -05:00
c8ad85dd0b Use unwrap_throw instead of normal unwrap for JsString -> String conversion
Should have less code size.
2019-02-10 13:59:39 -05:00
499ae1250e Merge pull request #1207 from T5uku5hi/add-allow-clippy
Add #[allow(clippy::*)] to the top-level items in codegen.rs
2019-02-10 19:37:27 +01:00
f774d52ed5 Fix broken links 2019-02-10 14:54:18 +00:00
5c0da8878d add #[allow(clippy::all)] in top-level items. 2019-02-09 20:20:10 +09:00
916789336c add #[allow(clippy::drop_ref)] 2019-02-09 03:47:25 +09:00