Commit Graph

1076 Commits

Author SHA1 Message Date
Jonas Trollvik
037915827b
Fix incorrect url 2018-07-27 10:10:11 +02:00
Alex Crichton
00bb6736e3
Add guide documentation for the js-sys crate (#566) 2018-07-26 17:56:55 -07:00
Alex Crichton
f893e3475c Only publish artifacts for main crate changes 2018-07-26 15:51:43 -07:00
Alex Crichton
de0776948d Tweak travis config 2018-07-26 15:50:51 -07:00
Nick Fitzgerald
28cb007c1b guide: Also publish the test crates 2018-07-26 15:12:04 -07:00
Nick Fitzgerald
7da0220b10 test: Add cargo.toml metadata 2018-07-26 15:11:34 -07:00
Nick Fitzgerald
da1e16d46c test-macro: Add Cargo.toml metadata 2018-07-26 15:08:59 -07:00
Nick Fitzgerald
8ec9713dd9 js-sys: Add some more Cargo.toml metadata like license 2018-07-26 15:06:24 -07:00
Nick Fitzgerald
6203fc8f98 js-sys: Add a js-sys specific CHANGELOG.md 2018-07-26 15:05:00 -07:00
Nick Fitzgerald
08a449f667 guide: Also tag the release commit and push it 2018-07-26 15:01:36 -07:00
Nick Fitzgerald
7a7d0d4097 guide: Allow dirty when publishing wasm-bindgen
Because we comment out the `[patch]` section and don't commit it.
2018-07-26 14:58:57 -07:00
Nick Fitzgerald
9a0470b1c4 Bump to 0.2.15 2018-07-26 14:53:59 -07:00
Nick Fitzgerald
a204c8d4b7
Merge pull request #565 from fitzgen/js-sys-iterator-protocol
js-sys: Unify all iterators under one generic iterator type
2018-07-26 14:22:34 -07:00
Nick Fitzgerald
58482b07a8
Merge pull request #558 from alexcrichton/wasm2es6js
Simplify wasm2es6js output
2018-07-26 13:51:56 -07:00
Nick Fitzgerald
62de3bad67 js-sys: Unify all iterators under one generic iterator type
The JS iterator protocol uses duck typing and we don't need separate
ArrayIterator and SetIterator etc types, we can have a single iterator type for
the whole protocol.
2018-07-26 13:48:52 -07:00
Sendil Kumar N
5ef5de6d45
Merge pull request #564 from alexcrichton/tweak-ci
Tweak Travis/AppVeyor config
2018-07-26 22:19:48 +02:00
Nick Fitzgerald
54109f9ccf
Merge pull request #556 from alexcrichton/fewer-copies
Optimize the execution time of wasm-bindgen tools
2018-07-26 12:38:25 -07:00
Nick Fitzgerald
b3458307a7
Merge pull request #557 from alexcrichton/pass-in-firefox
Tweak js-sys tests to pass in Firefox
2018-07-26 12:35:49 -07:00
Alex Crichton
eda1033246 Tweak Travis/AppVeyor config
* Fix running dist builds on tags
* Only run dist builds on tags, no need to run the full matrix.
* Fix dist builds on AppVeyor to include `wasm-bindgen-test-runner.exe`
* Only cache `~/.cargo` on Travis for the guide build, the `target` dir changes
  too much to cache it.
2018-07-26 11:31:38 -07:00
Tyler Wilcock
ba98491fc1 Enable History Web API (#561)
* Add Number.isNaN() binding

* Add binding for Math.hypot()

* Implement Math.min() and Math.max() bindings

* Enable History API
2018-07-26 10:21:04 -07:00
Alex Crichton
0d3f877ec4 Build tags on Travis 2018-07-26 10:16:11 -07:00
Richard Dodd (dodj)
2c69d25289 Add file location information when failing to parse WebIDL files. (#562) 2018-07-26 10:09:04 -07:00
Alex Crichton
55a9ec1b21 Simplify wasm2es6js output
Currently it generates a lot of shim functions which delegate to the wasm module
when loaded, but it turns out with `export let` we can just update the bindings!
Instead of exporting a bunch of shims this updates the export functionality to
only update the `export let` directives with the direct values from the wasm
module once the module is done loading.
2018-07-25 16:56:43 -07:00
Alex Crichton
41200743af Tweak js-sys tests to pass in Firefox
Turns out date parsing is slightly different there!
2018-07-25 16:55:11 -07:00
Nick Fitzgerald
64591ef403 Js sys use &str arguments (#555)
* js-sys: imports should take &str parameters instead of &JsString

* js-sys: Imports should take Option<&str> instead of Option<String>
2018-07-25 18:50:30 -05:00
Alex Crichton
0992e45e7f Use std::fs read/write conveniences
In addition to being more ergonomic these are much more efficient at reading
large files as they preallocate internally. This provides a nice speed boost
locally, reducing the overhead of `wasm-bindgen-test-runner` from 0.23s to
0.19s, yay!
2018-07-25 16:08:42 -07:00
Alex Crichton
f3942229fe More reuse of a parity_wasm::Module in the test runner
This commit updates the test runner to only deserialize a `Module` once and then
directly pass it to the `wasm-bindgen` config, avoiding pulling in a public
dependency with the same strategy as the `wasm-gc-api` crate for now.

This reduces the runtime of this step for `wasm-bindgen-test-runner` from ~0.23s
to ~0.19s on my machine.
2018-07-25 15:49:50 -07:00
Alex Crichton
764302cfcc Reuse the same parity_wasm::Module instance for wasmi
Since `wasmi` already has a public dependency on `parity_wasm` let's just use
it! A `clone` is much faster than a serialize + parse, reducing a `wasm-bindgen`
invocation on my machine from 0.2s to 0.18s.
2018-07-25 15:42:56 -07:00
Alex Crichton
9b5d47f5e1 Avoid serializing/reparsing modules during gc
Currently the `wasm-gc-api` crate doesn't expose `parity_wasm::Module` as a
public dependency which means that whenever we want to run a GC (which is twice
per `wasm-bindgen` invocation) we have to serialize and reparse the module a
lot! The `wasm-bindgen` has to serialize, `wasm-gc` then parses, `wasm-gc` then
serializes, and `wasm-bindgen` then parses.

This commit sidesteps all of these operations by ensuring that we always use the
same `parity_wasm::Module` instance, even when multiple versions of the
`parity_wasm` crate are in use. We'll get a speed boost when they happen to
align (which they always should for `wasm-bindgen`), but it'll work even if they
aren't aligned (by going through serialization).

Concretely on my machine this takes a `wasm-bindgen` invocation from 0.5s to
0.2s, a nice win!
2018-07-25 15:42:07 -07:00
Alex Crichton
19acb5bb72
Only emit static descriptors on wasm (#554)
This is a bit of a refinement of the solution from #548 to make sure that these
statics are only present on the `wasm32-*` targets, as otherwise these
descriptors are completely inert on other platforms!
2018-07-25 16:56:27 -05:00
Nick Fitzgerald
61fc8d2567 Js sys once over (#550)
* js-sys: Return `f64` instead of `Number`

* js-sys: remove trailing whitespace

* js-sys: Ensure that all imported types derive Clone and Debug

* js-sys: Imported functions should always take JS object arguments by-ref
2018-07-25 16:33:44 -05:00
Nick Fitzgerald
93933f033f
Merge pull request #552 from fitzgen/sort-workspace-members
chore: Sort workspace members
2018-07-25 14:31:43 -07:00
Nick Fitzgerald
33b6c6afe9 chore: Sort workspace members 2018-07-25 13:44:14 -07:00
Nick Fitzgerald
dbb498174e
Merge pull request #547 from derekdreery/extra_docs
Extra docs
2018-07-25 12:04:29 -07:00
Richard Dodd
66bc98cc4b Fix mistakes/nits. 2018-07-25 18:08:57 +01:00
Nick Fitzgerald
3f5a0fb31c Bump to 0.2.14 2018-07-25 09:46:45 -07:00
Nick Fitzgerald
606429165f
Merge pull request #548 from chinedufn/shorten-specifier
Fix LLVM ERROR (seemingly only on mac?)
2018-07-25 09:13:12 -07:00
Chinedu Francis Nwafili
c8f0304163
Fix LLVM ERROR
fixes #545
2018-07-25 07:24:39 -04:00
Richard Dodd
ba67089501 Some docs for functions in the parsing/codegen crates. 2018-07-25 11:42:01 +01:00
dependabot[bot]
269127a5c5 Bump @types/node from 10.5.2 to 10.5.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped) from 10.5.2 to 10.5.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-25 08:38:04 +00:00
Richard Dodd
2ee80a6c44 Add some docs 2018-07-24 17:37:49 +01:00
Jonathan Kingston
4b4bed5ce2 Initial support for Document, EventTarget, NodeList and Iterator (#541)
* Adding document and node support

* Initial support for Document, EventTarget, NodeList and Iterator

* Add in support for output option type
2018-07-24 09:00:46 -05:00
dependabot[bot]
15d0fcfcf4 Bump webpack from 4.16.1 to 4.16.2
Bumps [webpack](https://github.com/webpack/webpack) from 4.16.1 to 4.16.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.16.1...v4.16.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-24 09:05:55 +00:00
Tyler Wilcock
cefe1681ab Implement Math.min() and Math.max() bindings (#542)
* Add Number.isNaN() binding

* Add binding for Math.hypot()

* Implement Math.min() and Math.max() bindings
2018-07-23 23:50:29 -05:00
Alex Crichton
f437e06463 Fix a typo in Closure<FnMut(...)> 2018-07-23 17:51:49 -07:00
Stephan Wolski
b3ee71c20b WebIDL: Handle Invalid Enum Returns (#477)
* move ImportEnum attributes to a property

* borrow from_js_value argument

* make WebIDL enums non-exhaustive

* add more tests for WebIDL enums
2018-07-23 10:04:28 -05:00
Tyler Wilcock
5fddcf3868 Add Math.hypot binding (#538)
* Add Number.isNaN() binding

* Add binding for Math.hypot()
2018-07-23 09:11:03 -05:00
dependabot[bot]
5a0f8e783b Bump webpack-dev-server from 3.1.4 to 3.1.5
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.1.4...v3.1.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-23 08:57:31 +00:00
dependabot[bot]
7df3127ae3 Bump eslint from 5.1.0 to 5.2.0
Bumps [eslint](https://github.com/eslint/eslint) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v5.1.0...v5.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-23 08:47:07 +00:00
Marcin Baraniecki
de0ba29abc implements bindings for Object.is (#537)
* implements bindings for Object.is

* adds counterpart test cases for non-equal values
2018-07-22 12:42:10 -05:00