Commit Graph

2300 Commits

Author SHA1 Message Date
Nick Fitzgerald
51989aed88 No more wasm-bindgen-gc crate, so we don't need to publish it! 2019-02-12 12:44:45 -08:00
Nick Fitzgerald
d9cf9b3735 Bump to version 0.2.35 2019-02-12 11:36:19 -08:00
Alex Crichton
82b7bdeb93 Fix wasm-interpreter tests 2019-02-12 10:46:43 -08:00
Alex Crichton
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
Nick Fitzgerald
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
Alex Crichton
6004454775
Merge pull request #1237 from alexcrichton/walrus
Migrate `wasm-bindgen` to using `walrus`
2019-02-12 09:26:46 -06:00
Alex Crichton
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
Nick Fitzgerald
c30dbc3179 Write changelog entry for 0.2.34 2019-02-11 19:11:08 -08:00
Nick Fitzgerald
078257943d Bump to 0.2.34 2019-02-11 18:58:54 -08:00
Alex Crichton
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
Jonathan Kingston
5c81125b86 Fixup compiler warnings for Todo MVC example 2019-02-11 18:43:23 +00:00
Alex Crichton
311dafd366
Merge pull request #1235 from fitzgen/some-little-things
A couple small improvements
2019-02-11 06:39:09 -06:00
Nick Fitzgerald
f6362a653c
Merge pull request #1234 from stevebob/guide-fix-broken-links
Fix broken links
2019-02-10 20:45:18 +01:00
Nick Fitzgerald
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
Nick Fitzgerald
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
Nick Fitzgerald
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
Stephen Sherratt
f774d52ed5 Fix broken links 2019-02-10 14:54:18 +00:00
T5uku5hi
5c0da8878d add #[allow(clippy::all)] in top-level items. 2019-02-09 20:20:10 +09:00
T5uku5hi
916789336c add #[allow(clippy::drop_ref)] 2019-02-09 03:47:25 +09:00
T5uku5hi
1b764103f6 Merge remote-tracking branch 'upstream/master' into add-allow-clippy 2019-02-09 03:13:16 +09:00
Alex Crichton
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
Nick Fitzgerald
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
Alex Crichton
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
Chinedu Francis Nwafili
acd69e97ee
Remove RefCell 2019-02-07 07:14:33 -05:00
Chinedu Francis Nwafili
ed28ce9db2
Clean up 2019-02-05 13:47:46 -05:00
Alex Crichton
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
Alex Crichton
3de5253554 Remove passive segment tests for now 2019-02-04 22:24:08 -08:00
Alex Crichton
ef37986541 Update more parity-wasm 2019-02-04 22:06:10 -08:00
Alex Crichton
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
Nick Fitzgerald
e20c4067dc futures: Add a test for creating multiple futures from the same promise 2019-02-04 16:38:21 +01:00
dependabot[bot]
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
Alex Crichton
bf8a380264
Merge pull request #1226 from Pauan/optimize-catch
Simplifying the error handling code
2019-02-04 08:23:57 +01:00
Pauan
e4294babeb Simplifying the error handling code 2019-02-04 02:08:08 +01:00
Pauan
8b6e951e34 Adding in Reflect::get_f64, Reflect::get_u32, Reflect::set_f64, and Reflect::set_u32 2019-02-04 01:32:43 +01:00
T5uku5hi
fb8e158c9b remove unnecessary changes 2019-02-03 22:44:27 +09:00
T5uku5hi
51f7756e83 add #[allow(clippy::*)] to 901 line 2019-02-03 22:40:24 +09:00
T5uku5hi
d3a523439e comment out the all #[allow(clippy::*)] lines 2019-02-03 13:55:57 +09:00
T5uku5hi
223054811d fixed conflict 2019-02-03 13:49:42 +09:00
Alex Crichton
9f00664d81
Merge pull request #1219 from fitzgen/UnwrapThrowExt
Add the `UnwrapThrowExt<T>` trait
2019-02-01 15:19:27 -06:00
Alex Crichton
2e80313aa3
Merge pull request #1221 from rhysd/format-dts-file
Format .d.ts file
2019-02-01 09:24:49 -06:00
Alex Crichton
66be3d3f66
Merge pull request #1220 from carlosdp/patch-1
Fix version number in travis instruction
2019-02-01 09:14:08 -06:00
rhysd
6e2f10440e give 2 space indentations to each enum variant 2019-02-01 16:25:25 +09:00
rhysd
a1995cafd4 remove unnecessary blank lines in .d.ts file 2019-02-01 16:07:31 +09:00
rhysd
23ccd3b5c1 remove unnecessary space before function name in .d.ts file 2019-02-01 16:07:12 +09:00
rhysd
019a0863c4 give class members 2 spaces indentation in .d.ts files 2019-02-01 15:45:01 +09:00
Carlos Diaz-Padron
11db255e47
Fix version number in travis instruction 2019-01-31 18:00:49 -08:00
Nick Fitzgerald
0e11e4a3bd Add the UnwrapThrowExt<T> trait
An extension trait for `Option<T>` and `Result<T, E>` for unwraping the `T`
value, or throwing a JS error if it is not available.

These methods should have a smaller code size footprint than the normal
`Option::unwrap` and `Option::expect` methods, but they are specific to
working with wasm and JS.

On non-wasm32 targets, defaults to the normal unwrap/expect calls.
2019-01-31 13:26:21 -08:00
Alex Crichton
92072bf03c
Merge pull request #1218 from rustwasm/dependabot/npm_and_yarn/@wasm-tool/wasm-pack-plugin-0.2.3
Update @wasm-tool/wasm-pack-plugin requirement from 0.2.2 to 0.2.3
2019-01-31 10:14:17 -06:00
Chinedu Francis Nwafili
965bd8c9fa
Clean up 2019-01-31 07:32:12 -05:00
dependabot[bot]
08e7560f72
Update @wasm-tool/wasm-pack-plugin requirement from 0.2.2 to 0.2.3
Updates the requirements on [@wasm-tool/wasm-pack-plugin](https://github.com/wasm-tool/wasm-pack-plugin) to permit the latest version.
- [Release notes](https://github.com/wasm-tool/wasm-pack-plugin/releases)
- [Commits](https://github.com/wasm-tool/wasm-pack-plugin/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-31 08:12:51 +00:00