Commit Graph

288 Commits

Author SHA1 Message Date
6d61cd8b76 Bump to 0.2.61 (#2113) 2020-04-29 11:22:35 -05:00
a22bbca92c Making WebIDL generation deterministic (#2101)
* Making webidl generation deterministic

* Fixing line endings

* Regenerating WebIDL

* Running rustfmt
2020-04-22 20:01:40 -05:00
4900732f60 Add setBindGroup to immutable slice whitelist (#2087) 2020-04-17 10:08:35 -05:00
a19c8a3fe0 Bump to 0.2.60 (#2051)
* Bump to 0.2.60

* Try to fix CI

* Fix CI syntax
2020-03-25 16:33:36 -05:00
db8d3e4412 Bump to 0.2.59 (#2026)
Wow this is a big release!
2020-03-03 10:55:51 -06:00
3f4acc453b Dramatically improving the build time of web-sys (#2012)
* Pre-generating web-sys

* Fixing build errors

* Minor refactor for the unit tests

* Changing to generate #[wasm_bindgen} annotations

* Fixing code generation

* Adding in main bin to wasm-bindgen-webidl

* Fixing more problems

* Adding in support for unstable APIs

* Fixing bug with code generation

* More code generation fixes

* Improving the webidl program

* Removing unnecessary cfg from the generated code

* Splitting doc comments onto separate lines

* Improving the generation for unstable features

* Adding in support for string values in enums

* Now runs rustfmt on the mod.rs file

* Fixing codegen for constructors

* Fixing webidl-tests

* Fixing build errors

* Another fix for build errors

* Renaming typescript_name to typescript_type

* Adding in docs for typescript_type

* Adding in CI script to verify that web-sys is up to date

* Fixing CI script

* Fixing CI script

* Don't suppress git diff output

* Remove duplicate definitions of `Location`

Looks to be a preexisting bug in wasm-bindgen?

* Regenerate webidl

* Try to get the git diff command right

* Handle named constructors in WebIDL

* Remove stray rustfmt.toml

* Add back NamedConstructorBar definition in tests

* Run stable rustfmt over everything

* Don't run Cargo in a build script

Instead refactor things so webidl-tests can use the Rust-code-generation
as a library in a build script. Also fixes `cargo fmt` in the
repository.

* Fixup generated code

* Running web-sys checks on stable

* Improving the code generation a little

* Running rustfmt

Co-authored-by: Alex Crichton <alex@alexcrichton.com>
2020-03-02 17:39:36 -06:00
eb04cf2dda Upgrade weedle to v0.11 (#2024) 2020-03-02 15:31:02 -06:00
381660c49b Run rustfmt and keep it running on CI (#2023)
Thought we did this awhile back, but looks like we forgot to do so!
2020-03-02 11:44:14 -06:00
bab83a7ff4 Whitelist send_with_u8_array slice (#2015)
* Whitelist send_with_u8_array slice

Fixes #2014

* Fix send slice

* Remove chromedriver comment

* Get slice tests running in CI
2020-03-02 09:13:15 -06:00
93cb6cb65d Symlink LICENSE files in crates (#2018) 2020-02-28 17:41:28 -06:00
99c59a771e [WIP] Add support for unstable WebIDL (#1997)
* Re-enable WebGPU WebIDL as experimental

* Add `web_sys_unstable_apis` attribute

* Add test for unstable WebIDL

* Include unstable WebIDL in docs.rs builds

* Add docs and doc comment for unstable APIs

* Add unstable API checks to CI
2020-02-26 16:30:11 -06:00
ec1b9453c9 Allow web-sys to emit correct typescript declarations from webidl (#1998)
* Update to emit typescript names

* Update to use NamedAnyref

* Update incoming / outgoing

* Remove added space

* Remove comment

* Add basic typescript tests for web-sys
2020-02-19 09:14:32 -06:00
450c477197 Adding missing uniformMatrix bindings rules for non-square matrices. (#1957)
Fixes https://github.com/rustwasm/wasm-bindgen/issues/1956
2020-01-15 13:08:19 -06:00
2902ceb26f Bump to 0.2.58 (#1946) 2020-01-07 13:48:25 -06:00
56e4d7de1d Bump to 0.2.57 (#1943) 2020-01-06 13:17:28 -06:00
36afba74d4 Bump bumpalo (#1925)
* Fix typo in comment

* Bump `bumpalo` dependency to 3.0.0

* Fix warning about unused loop label
2020-01-06 09:24:32 -06:00
580daab1d3 Release 0.2.56 (#1922) 2019-12-20 10:31:17 -06:00
aa461c363b Add one more webkit-specific whitelist in web-sys (#1865)
* Add one more webkit-specific whitelist in web-sys

* Run rustfmt
2019-11-21 09:30:08 -06:00
db9d603c8f Bump to 0.2.55 (#1864) 2019-11-19 11:04:37 -06:00
3573164b52 Bump to 0.2.54 (#1854) 2019-11-07 12:59:01 -06:00
935f71afec Switch from failure to anyhow (#1851)
This commit switches all of `wasm-bindgen` from the `failure` crate to
`anyhow`. The `anyhow` crate should serve all the purposes that we
previously used `failure` for but has a few advantages:

* It's based on the standard `Error` trait rather than a custom `Fail`
  trait, improving ecosystem compatibility.
* We don't need a `#[derive(Fail)]`, which means that's less code to
  compile for `wasm-bindgen`. This notably helps the compile time of
  `web-sys` itself.
* Using `Result<()>` in `fn main` with `anyhow::Error` produces
  human-readable output, so we can use that natively.
2019-11-04 11:35:28 -06:00
c7c169ae72 Bump to 0.2.53 (#1840) 2019-10-29 09:37:37 -05:00
513285f73d Run rustfmt 2019-10-28 20:15:05 -07:00
a20dd26dde Bump to 0.2.52 (#1833) 2019-10-24 16:08:45 -05:00
0e3b696fb7 Fix return type of WebIDL indexing getters (#1789)
* Wrap the return type of indexing getters as Option<T> if necessary.

* Update tests for indexing getters

* Fix typo

* Add comments describing what the code segment is doing

* Update indexing getter usage

* Revert "Add comments describing what the code segment is doing"

This reverts commit 624a14c0fffb78e8eaed21658ddddbad70b2462d.

* Revert "Fix typo"

This reverts commit 487fc307bc08c2a7778b2117fb03f0f5eb5a3c18.

* Revert "Wrap the return type of indexing getters as Option<T> if necessary."

This reverts commit 547f3dd36c1182928ff728a8452591a492b65e21.

* Update the return signatures of WebIDL indexing getters
2019-10-03 19:48:37 -05:00
6d1dc813c4 Bump to 0.2.51 (#1797)
This notably brings in async/await support for current beta/nightly
users. Yay!
2019-09-26 14:07:28 -05:00
88618116ac Add support for #[wasm_bindgen] on async fn (#1754)
This commit adds support to attach `#[wasm_bindgen]` on an `async fn`
which will change the return value into a `Promise` in JS. This in
theory has the exact same semantics as an `async` function in JS where
you call it with all the arguments, nothing happens and you get a
promise back, and then later the promise actually resolves.

This commit also adds a helper trait, `IntoJsResult`, to allow `async`
functions with multiple kinds of return values instead of requiring
everything to be `Result<JsValue, JsValue>`.
2019-09-06 13:47:16 -05:00
c2daa4f63c Bump to 0.2.50 2019-08-19 04:21:27 -07:00
c1d4fddeac Bump to 0.2.49 2019-08-14 08:32:02 -07:00
45b43905b4 Upgrade to syn/quote 1.0
Fresh off the presses let's start the update!
2019-08-13 10:37:08 -07:00
ed778f5eb2 Adding in PartialEq and Eq to web-sys types 2019-07-18 23:12:49 +02:00
bce892b625 Add #[wasm_bindgen(assert_no_shim)] on imported functions for testing
This should not be used outside of wasm-bindgen's test suite.
2019-07-12 12:34:29 -07:00
e596ef596c Bump to 0.2.48 2019-07-11 15:02:39 -07:00
ce40388a7f Update weedle requirement from 0.9 to 0.10
Updates the requirements on [weedle](https://github.com/rustwasm/weedle) to permit the latest version.
- [Release notes](https://github.com/rustwasm/weedle/releases)
- [Commits](https://github.com/rustwasm/weedle/compare/0.9.0...0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-11 10:07:41 +00:00
f27de49989 whitelist slices for webgl2 uniformNuiv 2019-07-03 23:32:00 +03:00
d71ab78fc6 Bump to 0.2.47 2019-06-19 11:14:37 -07:00
3b06e58c9e Handle more slice types in flag_slices_immutable
Should address the latest comment on #1539
2019-06-17 05:30:10 -07:00
8fc0a38402 Bump to 0.2.46 2019-06-14 11:44:58 -07:00
117928f0c0 Add doc comments to web-sys dictionaries/fields
This commit ensures that web-sys generated dictionaries and fields all
have comments like interfaces do, indicating a bare minimum of what's
happening as well as the required features to enable the API.
2019-06-03 13:18:38 -07:00
877c31cdc8 web-sys: Don't remove dictionaries if required fields are removed
This commit updates the conditional binding generation for dictionaries
to ensure that a dictionary is not entirely removed if any of its
required fields are removed. If a required field is removed, however, it
cannot be constructed, so the constructor is removed.
2019-06-03 12:57:21 -07:00
82467f9793 Use dyn with all trait objects
Fixes new warnings showing up on nightly nowadays.
2019-06-03 08:28:55 -07:00
137bbdf2e3 Bump to 0.2.45 2019-05-20 09:44:03 -07:00
ae2aba094c whitelist uniforms with Int32List 2019-05-17 09:59:28 +03:00
lqd
ca0008174a Update weedle to version 0.9 2019-05-16 18:52:25 +02:00
773c6ff430 Bump to 0.2.44 2019-05-16 07:47:23 -07:00
15e5162275 Add bufferData and clearBuffer to immutable slice whitelist 2019-05-02 18:19:31 +02:00
f2429be07f Bump to 0.2.43 2019-04-29 08:28:41 -07:00
ff1addbbaa Run cargo fmt 2019-04-16 10:52:27 -07:00
01a52233d3 Support [NoInterfaceObject] in web-sys
This commit enables `[NoInterfaceObject]` annotated interfaces in
`web-sys`. The `NoInterfaceObject` attribute means that there's not
actually a JS class for the object, but all of its properties and such
can still be accessed structually and invoked. This should help provide
more bindings for some more common types on the web!

Note that this builds on recent features to ensure that `dyn_into` and
friends always fail for `NoInterfaceObject` objects because they don't
actually have a class.

Closes #893
Closes #1257
Closes #1315
2019-04-15 10:36:01 -07:00
cb880bdbff Add customisable is_type_of 2019-04-12 17:23:42 +01:00