Commit Graph

1085 Commits

Author SHA1 Message Date
Jonathan Kingston
2a721737ab Add button element tests for web-sys. (#577) 2018-07-28 09:36:50 -07:00
Noumir Poutipou
fa4b636c25 Fix very small typo in guide (#575) 2018-07-28 09:36:23 -07:00
Nick Fitzgerald
decdbd92b8 Js sys contributing (#574)
* guide: js-sys testing page should refer to js-sys not web-sys

* guide: Use checklist for adding new js-sys APIs
2018-07-27 16:22:33 -07:00
Joel Gallant
01194558bf Adds Array.prototype.splice() to js-sys (#571) 2018-07-27 10:07:21 -07:00
Alex Crichton
66649018ae
Speed up examples CI builder (#572)
No need to `npm install` a bunch of times, we only need to do it once!
2018-07-27 10:07:00 -07:00
Jonathan Kingston
67b43ee389 Adding in initial support for all HTML*Element interfaces. (#568)
* Adding in initial support for all HTML*Element interfaces.

* Fix camelcasing of short HTML interface names

* Disabling span test as breaks on taskcluster
2018-07-27 09:57:24 -07:00
Alex Crichton
55e2ce9b53 Note that new WebIDL may need TODO comments
We don't support all features just yet!

Closes #570
2018-07-27 08:50:41 -07:00
Alex Crichton
f90f53c540 Fix some links in the guide
Closes #569
2018-07-27 08:48:10 -07:00
Sendil Kumar N
68ef6b429e
Merge pull request #567 from jontro/patch-1
Fix incorrect url
2018-07-27 12:06:04 +02:00
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