- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Comparing changes
Open a pull request
base repository: rustwasm/wasm-bindgen
base: 0.2.47
head repository: rustwasm/wasm-bindgen
compare: 0.2.48
Commits on Jun 21, 2019
-
Second large refactor for WebIDL bindings
This commit is the second, and hopefully last massive, refactor for using WebIDL bindings internally in `wasm-bindgen`. This commit actually fully executes on the task at hand, moving `wasm-bindgen` to internally using WebIDL bindings throughout its code generation, anyref passes, etc. This actually fixes a number of issues that have existed in the anyref pass for some time now! The main changes here are to basically remove the usage of `Descriptor` from generating JS bindings. Instead two new types are introduced: `NonstandardIncoming` and `NonstandardOutgoing` which are bindings lists used for incoming/outgoing bindings. These mirror the standard terminology and literally have variants which are the standard values. All `Descriptor` types are now mapped into lists of incoming/outgoing bindings and used for process in wasm-bindgen. All JS generation has been refactored and updated to now process these lists of bindings instead of the previous `Descriptor`. In other words this commit takes `js2rust.rs` and `rust2js.rs` and first splits them in two. Interpretation of `Descriptor` and what to do for conversions is in the binding selection modules. The actual generation of JS from the binding selection is now performed by `incoming.rs` and `outgoing.rs`. To boot this also deduplicates all the code between the argument handling of `js2rust.rs` and return value handling of `rust2js.rs`. This means that to implement a new binding you only need to implement it one place and it's implemented for free in the other! This commit is not the end of the story though. I would like to add a mdoe to `wasm-bindgen` that literally emits a WebIDL bindings section. That's left for a third (and hopefully final) refactoring which is also intended to optimize generated JS for bindings. This commit currently loses the optimization where an imported is hooked up by value directly whenever a shim isn't needed. It's planned that the next refactoring to emit a webidl binding section that can be added back in. It shouldn't be too too hard hopefully since all the scaffolding is in place now. cc #1524
Configuration menu - View commit details
-
Copy full SHA for 3cc3084 - Browse repository at this point
Copy the full SHA 3cc3084View commit details
Commits on Jun 23, 2019
-
Simplify instructions for CI testing of wasm code
After discussion on #1611, this replaces the complicated setup with the automated install of wasm-pack. I have added a note on caching, which I think would be useful to users, since the installer is really stuborn about not wanting to be automated. eg. `yes | installer` won't work. You have to remove all wasm-pack binaries before running it in order for it to be automated.
Configuration menu - View commit details
-
Copy full SHA for 5bb6c6c - Browse repository at this point
Copy the full SHA 5bb6c6cView commit details -
Be sure to GC our imports as well as the module
After a module goes through its primary GC pass we need to look over the set of remaining imports and use that to prune the set of imports that we're binding. Closes #1613
Configuration menu - View commit details
-
Copy full SHA for 2e03961 - Browse repository at this point
Copy the full SHA 2e03961View commit details -
Use
view
instead ofsubarray
in WebGL examplePointed out in #1615!
Configuration menu - View commit details
-
Copy full SHA for 04aea4e - Browse repository at this point
Copy the full SHA 04aea4eView commit details -
Merge pull request #1617 from alexcrichton/fix-gc
Be sure to GC our imports as well as the module
Configuration menu - View commit details
-
Copy full SHA for 7f55067 - Browse repository at this point
Copy the full SHA 7f55067View commit details -
Merge pull request #1618 from alexcrichton/update-webgl
Use `view` instead of `subarray` in WebGL example
Configuration menu - View commit details
-
Copy full SHA for c664110 - Browse repository at this point
Copy the full SHA c664110View commit details
Commits on Jun 25, 2019
-
Merge pull request #1594 from alexcrichton/webidl-for-realz
Second large refactor for WebIDL bindings
Configuration menu - View commit details
-
Copy full SHA for e0ef329 - Browse repository at this point
Copy the full SHA e0ef329View commit details -
Configuration menu - View commit details
-
Copy full SHA for e41bd68 - Browse repository at this point
Copy the full SHA e41bd68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 597d66a - Browse repository at this point
Copy the full SHA 597d66aView commit details -
Merge pull request #1616 from najamelan/fix/travis
Simplify instructions for CI testing of wasm code
Configuration menu - View commit details
-
Copy full SHA for 1beb19b - Browse repository at this point
Copy the full SHA 1beb19bView commit details -
Revert
add
example to what was originally intendedRemove stray debugging code added in the meantime.
Configuration menu - View commit details
-
Copy full SHA for b601c3f - Browse repository at this point
Copy the full SHA b601c3fView commit details -
Switch to
debug_assert_eq!
in intrinicReduce the code size of wasm files by avoiding an `assert_eq!` and panic code in production builds.
Configuration menu - View commit details
-
Copy full SHA for d9e53ac - Browse repository at this point
Copy the full SHA d9e53acView commit details -
Remove the long-defunkt
Stack
traitThis was used oh-so-long ago but hasn't been used in a very long time since then. It's served no purpose for a very long time now and I don't think we have a plan for giving it a purpose any time soon, so let's remove it.
Configuration menu - View commit details
-
Copy full SHA for a021a96 - Browse repository at this point
Copy the full SHA a021a96View commit details -
Merge pull request #1624 from alexcrichton/less-stack
Remove the long-defunkt `Stack` trait
Configuration menu - View commit details
-
Copy full SHA for e16dd15 - Browse repository at this point
Copy the full SHA e16dd15View commit details -
Remove
__wbindgen_global_argument_ptr
intrinsicWe don't actually need this since we can simply pass in a number like 8 for the return pointer all the time. There's no need to allocate more space in static data for a return pointer tha may not even get used!
Configuration menu - View commit details
-
Copy full SHA for eb550f5 - Browse repository at this point
Copy the full SHA eb550f5View commit details -
Update all non-mutable slices into Rust to use
AllocCopy
This commit migrates all non-mutable slices incoming into Rust to use the standard `AllocCopy` binding instead of using a custom `Slice` binding defined by `wasm-bindgen`. This is done by freeing the memory from Rust rather than freeing the memory from JS. We can't do this for mutable slices yet but otherwise this should be working well!
Configuration menu - View commit details
-
Copy full SHA for b9c27b9 - Browse repository at this point
Copy the full SHA b9c27b9View commit details -
Merge pull request #1626 from alexcrichton/more-standard
Update all non-mutable slices into Rust to use `AllocCopy`
Configuration menu - View commit details
-
Copy full SHA for e106ca3 - Browse repository at this point
Copy the full SHA e106ca3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86937b9 - Browse repository at this point
Copy the full SHA 86937b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cb9b88 - Browse repository at this point
Copy the full SHA 8cb9b88View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92a464d - Browse repository at this point
Copy the full SHA 92a464dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9fd30b - Browse repository at this point
Copy the full SHA b9fd30bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 497c5ed - Browse repository at this point
Copy the full SHA 497c5edView commit details
Commits on Jun 26, 2019
-
Merge pull request #1620 from Pauan/add-typed-array-into
Add From impl for TypedArrays
Configuration menu - View commit details
-
Copy full SHA for 250e84f - Browse repository at this point
Copy the full SHA 250e84fView commit details -
Merge pull request #1625 from alexcrichton/less-return-ptr
Remove `__wbindgen_global_argument_ptr` intrinsic
Configuration menu - View commit details
-
Copy full SHA for 792ab40 - Browse repository at this point
Copy the full SHA 792ab40View commit details
Commits on Jun 27, 2019
-
Samuel Warfield committed
Jun 27, 2019 Configuration menu - View commit details
-
Copy full SHA for caa86a0 - Browse repository at this point
Copy the full SHA caa86a0View commit details
Commits on Jun 28, 2019
-
Samuel Warfield committed
Jun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 06d0704 - Browse repository at this point
Copy the full SHA 06d0704View commit details -
Samuel Warfield committed
Jun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 367a56e - Browse repository at this point
Copy the full SHA 367a56eView commit details
Commits on Jun 29, 2019
-
Merge pull request #1633 from Warfields/master
Attempted to tackle #1622
Configuration menu - View commit details
-
Copy full SHA for bf631ed - Browse repository at this point
Copy the full SHA bf631edView commit details
Commits on Jul 3, 2019
-
Configuration menu - View commit details
-
Copy full SHA for f27de49 - Browse repository at this point
Copy the full SHA f27de49View commit details
Commits on Jul 4, 2019
-
Merge pull request #1639 from dakom/master
whitelist slices for webgl2 uniformNuiv
Configuration menu - View commit details
-
Copy full SHA for 7fe3dfd - Browse repository at this point
Copy the full SHA 7fe3dfdView commit details
Commits on Jul 6, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 2541507 - Browse repository at this point
Copy the full SHA 2541507View commit details
Commits on Jul 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 8f52f10 - Browse repository at this point
Copy the full SHA 8f52f10View commit details -
Merge pull request #1646 from ibaryshnikov/explicit-extension
Added explicit extension for imported .wasm file for --target bundler
Configuration menu - View commit details
-
Copy full SHA for 16fc059 - Browse repository at this point
Copy the full SHA 16fc059View commit details -
Merge pull request #1645 from derekdreery/fix_futures_0_3_hack
Add in (unsafe and incorrect) impls of Send/Sync that are now required.
Configuration menu - View commit details
-
Copy full SHA for 604c036 - Browse repository at this point
Copy the full SHA 604c036View commit details -
Use static accessors if possible to get global object
Previously we always used `Function('return this')` but this triggers CSP errors since it's basically `eval`. Instead this adds a few preflight checks to look for objects like `globalThis`, `self`, etc. Currently we don't have a `#[wasm_bindgen]` function annotation to import a bare global field like `self`, but we test accesses with `self.self` and `globalThis.globalThis`, catching errors to handle any issues. Closes #1641
Configuration menu - View commit details
-
Copy full SHA for 0b08bba - Browse repository at this point
Copy the full SHA 0b08bbaView commit details
Commits on Jul 9, 2019
-
Update futures implementation to not destroy callbacks
JS engines guarantee that at least one of our `then` callbacks are invoked, so that means if we destroy them prematurely they're guaranteed to log an exception to the console! Instead to prevent exceptions from happening tweak how the completion callbacks for JS futures are managed and ensure that the closures stay alive until they're invoked later. Closes #1637
Configuration menu - View commit details
-
Copy full SHA for d32b6a9 - Browse repository at this point
Copy the full SHA d32b6a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ba2985 - Browse repository at this point
Copy the full SHA 1ba2985View commit details -
Fix warning about dead code when testing on non-wasm32 targets
There are functions that are only used on wasm32 targets, but `cfg`ing them is more work than just making the modules public, and this is just a testing crate.
Configuration menu - View commit details
-
Copy full SHA for 6cb659d - Browse repository at this point
Copy the full SHA 6cb659dView commit details -
Merge pull request #1652 from fitzgen/fix-some-warnings
Fix some warnings
Configuration menu - View commit details
-
Copy full SHA for 15cc4fb - Browse repository at this point
Copy the full SHA 15cc4fbView commit details
Commits on Jul 10, 2019
-
Merge pull request #1649 from alexcrichton/fix-futures
Update futures implementation to not destroy callbacks
Configuration menu - View commit details
-
Copy full SHA for b64f5c0 - Browse repository at this point
Copy the full SHA b64f5c0View commit details -
Merge pull request #1650 from alexcrichton/less-csp
Use static accessors if possible to get global object
Configuration menu - View commit details
-
Copy full SHA for d02e115 - Browse repository at this point
Copy the full SHA d02e115View commit details
Commits on Jul 11, 2019
-
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](rustwasm/weedle@0.9.0...0.10.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Configuration menu - View commit details
-
Copy full SHA for ce40388 - Browse repository at this point
Copy the full SHA ce40388View commit details -
Merge pull request #1655 from rustwasm/dependabot/cargo/weedle-0.10
Update weedle requirement from 0.9 to 0.10
Configuration menu - View commit details
-
Copy full SHA for c21c85a - Browse repository at this point
Copy the full SHA c21c85aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6252c7a - Browse repository at this point
Copy the full SHA 6252c7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e596ef5 - Browse repository at this point
Copy the full SHA e596ef5View commit details -
Merge pull request #1657 from fitzgen/fix-dyn-warnings
Fix warnings about missing `dyn` on trait objects
Configuration menu - View commit details
-
Copy full SHA for 5c97559 - Browse repository at this point
Copy the full SHA 5c97559View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3ddd09 - Browse repository at this point
Copy the full SHA a3ddd09View commit details
There are no files selected for viewing