Commit Graph

1561 Commits

Author SHA1 Message Date
Alex Crichton
9d5898ab48 Bump to 0.2.20 2018-09-06 14:49:43 -07:00
Alex Crichton
cda71757d3 Tweak ArrayBuffer IDL type expansion slightly
A few small changes here:

* `ArrayBufferView` and `BufferSource` are expanded to themselves plus
  `Uint8ArrayMut` instead of `Object` to ensure we keep the original type.
* Generating an argument type for `ArrayBufferView`, `BufferSource`, and
  `Object` all now generate shared references instead of owned objects, which is
  a little more consistent with the other interface types.
2018-09-06 10:09:03 -07:00
Alex Crichton
3c41d39b16
Merge pull request #745 from gnunicorn/webcrypto
Add ArrayBufferView & BufferSource; Enables Webcrypto API
2018-09-06 10:01:49 -07:00
Benjamin Kampmann
6efbf5076c Adding Uint8ArrayMut, disable mutability for all other than this one 2018-09-06 16:24:43 +02:00
Benjamin Kampmann
3076e40b21 Require shared refs to be mutable 2018-09-06 16:24:17 +02:00
Benjamin Kampmann
8b08fc16c5 Making ArrayBufferView & BufferSource a union 2018-09-06 16:23:39 +02:00
Benjamin Kampmann
031ba39036 Bump weedle version 2018-09-06 16:22:26 +02:00
Benjamin Kampmann
cb8411b346 Add BufferSource && ArrayBufferView to &[u8] 2018-09-06 16:22:24 +02:00
Nick Fitzgerald
c918d770bb
README: Make the link to the guide bold 2018-09-05 15:00:08 -07:00
Alex Crichton
038b087ba3 Provide docs.rs metadata for generating docs
Makes sure that docs.rs, when it supports it, provides all the documentation for
all our features!
2018-09-05 12:57:36 -07:00
Alex Crichton
269c491380
Gate web-sys APIs on activated features (#790)
* Gate `web-sys` APIs on activated features

Currently the compile times of `web-sys` are unfortunately prohibitive,
increasing the barrier to using it. This commit updates the crate to instead
have all APIs gated by a set of Cargo features which affect what bindings are
generated at compile time (and which are then compiled by rustc). It's
significantly faster to activate only a handful of features vs all thousand of
them!

A magical env var is added to print the list of all features that should be
generated, and then necessary logic is added to ferry features from the build
script to the webidl crate which then uses that as a filter to remove items
after parsing. Currently parsing is pretty speedy so we'll unconditionally parse
all WebIDL files, but this may change in the future!

For now this will make the `web-sys` crate a bit less ergonomic to use as lots
of features will need to be specified, but it should make it much more
approachable in terms of first-user experience with compile times.

* Fix AppVeyor testing web-sys

* FIx a typo

* Udpate feature listings from rebase conflicts

* Add some crate docs and such
2018-09-05 12:55:30 -07:00
Alex Crichton
c6d3011cff
Merge pull request #785 from afdw/master
Add initial support for unions in return types, add more fixes for case of identifiers
2018-09-05 09:26:42 -07:00
Anton Danilkin
e5f382eccf Remove support for non-object unions, add more comments 2018-09-05 18:15:02 +03:00
Nick Fitzgerald
b00153cbb3
Merge pull request #789 from alexcrichton/fix-mdn
Fix regression of missing documentation
2018-09-04 16:32:38 -07:00
Alex Crichton
6b0cea73cd Fix regression of missing documentation
I forgot to add MDN docs for #765 to member operations, but this commit adds
them back!

Closes #786
2018-09-04 14:52:56 -07:00
Anton Danilkin
fcd890a70e Remove dead code 2018-09-04 21:03:23 +03:00
Anton Danilkin
095f86fa51 Use object type whenever possible 2018-09-03 21:37:58 +03:00
Alex Crichton
a22094c023
Merge pull request #787 from bspeice/patch-1
[WIP] Remove --wasm2asm flag, use binaryen directly
2018-09-03 11:24:04 -07:00
Bradlee Speice
0965b77af8 Remove --wasm2js flag entirely 2018-09-03 13:56:55 -04:00
Alex Crichton
1a00e94324
Merge pull request #726 from derekdreery/variadic_js_functions
Support variadic javascript function parameters
2018-09-03 10:28:58 -07:00
Alex Crichton
e4cad4b979
Merge pull request #781 from alexcrichton/fix-location
Handle [Unforgeable] on interfaces
2018-09-03 10:25:20 -07:00
Richard Dodd
5c7e638b8c Handle variadic no args more gracefully. 2018-09-03 09:50:26 +01:00
Bradlee Speice
c69833f253 Fix some references I missed 2018-09-02 22:32:19 -04:00
bspeice
724eb53d3c
Update wasm2es6js.rs
Binaryen renamed the tool to wasm2js instead of wasm2asm - https://github.com/WebAssembly/binaryen/pull/1642
2018-09-02 22:02:15 -04:00
Anton Danilkin
14c2c04ccd Fix canvas test 2018-09-02 20:51:37 +03:00
Anton Danilkin
75ac7ca64e Fix nullable union types 2018-09-02 20:37:12 +03:00
Anton Danilkin
ff516d0211 Add initial support for unions in return types, add more fixes for case of identifiers 2018-09-02 15:09:51 +03:00
Richard Dodd
e279987fa4 Merge remote-tracking branch 'upstream/master' into variadic_js_functions 2018-09-01 22:24:27 +01:00
Richard Dodd
7d5d845608 Add docs and remove typecheck from variadic attribute 2018-09-01 13:55:35 +01:00
Alex Crichton
cfb4be8d3c Handle [Unforgeable] on interfaces
In addition to handling it on methods look like it also shows up on interfaces!

Closes #780
2018-08-31 17:38:34 -07:00
Alex Crichton
986f561209
Merge pull request #765 from alexcrichton/fix-some-overloads
Change how naming overloaded methods works
2018-08-31 09:49:46 -07:00
Richard Dodd
ce1cb84327 Merge branch 'master' into variadic_js_functions 2018-08-31 10:08:53 +01:00
Richard Dodd
958e557c86 try removing typecheck 2018-08-31 09:59:11 +01:00
Alex Crichton
3204c514ab Fix typos 2018-08-30 22:31:03 -07:00
Alex Crichton
c9c776b0b4 Review comments 2018-08-30 16:29:51 -07:00
Alex Crichton
14cb2dd4cf Fix fetch example ... again? 2018-08-30 14:26:22 -07:00
Alex Crichton
0e18188ff9
Merge pull request #774 from fitzgen/add-afdw-to-the-team
Add @afdw to the team! \o/
2018-08-30 14:06:51 -07:00
Alex Crichton
76dba8c677
Merge pull request #775 from alexcrichton/better-version
Automatically change the schema version on all publishes
2018-08-30 13:48:42 -07:00
Alex Crichton
90fce8c9d4 Fix audio example 2018-08-30 13:45:42 -07:00
Alex Crichton
de6aa6c97e Automatically change the schema version on all publishes
Closes #773
2018-08-30 13:26:07 -07:00
Alex Crichton
12a7558374
Merge pull request #772 from fitzgen/links-in-cargo-toml
Add `links` section to `Cargo.toml`
2018-08-30 13:24:29 -07:00
Nick Fitzgerald
81c9bbd1bd Add links section to Cargo.toml
Because only a single `wasm_bindgen` version can be used in a dependency graph,
pretend we link a native library so that `cargo` will provide better error
messages than the esoteric linker errors we would otherwise trigger.
2018-08-30 13:04:27 -07:00
Nick Fitzgerald
e290c75c32 Add @afdw to the team! \o/ 2018-08-30 12:59:34 -07:00
Alex Crichton
e283093997 Fix the console_log example 2018-08-30 12:55:21 -07:00
Alex Crichton
dd3dba9285 Delete lots of now-unused code 2018-08-30 12:54:54 -07:00
Alex Crichton
923abc7d85 Migrate constructors to new naming scheme 2018-08-30 12:54:54 -07:00
Alex Crichton
5a4a34d4a1 Migrate methods to new naming scheme
Allows deletion of `create_basic_method`!
2018-08-30 12:54:54 -07:00
Alex Crichton
15d4338abe Reimplement name disambiguation on overloading
This commit reimplements how we disambiguate function names on overloading.
Previously functions would be first be disambiguated if they had multiple
instances of the same name, and *then* functions would be disambiguated
aftewards by if their arguments expanded to more than one type to generate.

This commit instead collects everything into one list during the first pass.
This one list contains all signatures known for a given name. Later this list is
walked in one pass to generate all methods necessary, expanding names all at
once instead of two steps.

This should improve the naming of methods across multiple functions which also
have optional arguments. Support in this commit is just enough for namespaces,
but following commits will update the strategy for mixins/interfaces.
Additionally only new code was added in this commit which duplicates a lot of
functionality, but subsequent commits will remove the old code that will
eventually no longer be used.
2018-08-30 12:54:54 -07:00
Alex Crichton
0a18ca4490 Minor tweaks to first_pass.rs
Nothing much of consequence
2018-08-30 12:54:54 -07:00
Alex Crichton
6cf3b90e63 Deindent a few helper functions in dictionaries
No need for it to be an inner function now that it's using methods!
2018-08-30 12:54:54 -07:00