Commit Graph

2759 Commits

Author SHA1 Message Date
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
1b764103f6 Merge remote-tracking branch 'upstream/master' into add-allow-clippy 2019-02-09 03:13:16 +09:00
812c6bf1da Merge pull request #1233 from fitzgen/fix-issue-1232
Use textContent instead of innerHTML for extracting logs from headless browser tests
2019-02-08 11:05:35 +01:00
11eeeb8fc8 Use textContent instead of innerHTML for extracting logs from headless browser tests
Easier to maintain fidelity and less likely to be sabotaged by XSS and
`<script>` tags.

Fixes #1232
2019-02-08 10:35:19 +01:00
9d27bc2e8b Merge pull request #1199 from chinedufn/ref-slice
Whitelist for slice args that do not need to be mutable
2019-02-07 13:40:36 +01:00
acd69e97ee Remove RefCell 2019-02-07 07:14:33 -05:00
ed28ce9db2 Clean up 2019-02-05 13:47:46 -05:00
74cd3c08f6 Merge pull request #1228 from rustwasm/dependabot/cargo/parity-wasm-0.36
Update parity-wasm requirement from 0.35 to 0.36
2019-02-05 08:28:53 +01:00
3de5253554 Remove passive segment tests for now 2019-02-04 22:24:08 -08:00
ef37986541 Update more parity-wasm 2019-02-04 22:06:10 -08:00
a0c8514e66 Merge pull request #1230 from fitzgen/multiple-futures-same-promise
futures: Add a test for creating multiple futures from the same promise
2019-02-04 20:57:35 +01:00
e20c4067dc futures: Add a test for creating multiple futures from the same promise 2019-02-04 16:38:21 +01:00
4a50d7b71c Update parity-wasm requirement from 0.35 to 0.36
Updates the requirements on [parity-wasm](https://github.com/paritytech/parity-wasm) to permit the latest version.
- [Release notes](https://github.com/paritytech/parity-wasm/releases)
- [Commits](https://github.com/paritytech/parity-wasm/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-04 08:30:40 +00:00
bf8a380264 Merge pull request #1226 from Pauan/optimize-catch
Simplifying the error handling code
2019-02-04 08:23:57 +01:00
e4294babeb Simplifying the error handling code 2019-02-04 02:08:08 +01:00
8b6e951e34 Adding in Reflect::get_f64, Reflect::get_u32, Reflect::set_f64, and Reflect::set_u32 2019-02-04 01:32:43 +01:00
fb8e158c9b remove unnecessary changes 2019-02-03 22:44:27 +09:00
51f7756e83 add #[allow(clippy::*)] to 901 line 2019-02-03 22:40:24 +09:00
d3a523439e comment out the all #[allow(clippy::*)] lines 2019-02-03 13:55:57 +09:00
223054811d fixed conflict 2019-02-03 13:49:42 +09:00
9f00664d81 Merge pull request #1219 from fitzgen/UnwrapThrowExt
Add the `UnwrapThrowExt<T>` trait
2019-02-01 15:19:27 -06:00
2e80313aa3 Merge pull request #1221 from rhysd/format-dts-file
Format .d.ts file
2019-02-01 09:24:49 -06:00
66be3d3f66 Merge pull request #1220 from carlosdp/patch-1
Fix version number in travis instruction
2019-02-01 09:14:08 -06:00