mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 05:52:21 +03:00
eee71de0ce
* Tweak the implementation of heap closures This commit updates the implementation of the `Closure` type to internally store an `Rc` and be suitable for dropping a `Closure` during the execution of the closure. This is currently needed for promises but may be generally useful as well! * Support asynchronous tests This commit adds support for executing tests asynchronously. This is modeled by tests returning a `Future` instead of simply executing inline, and is signified with `#[wasm_bindgen_test(async)]`. Support for this is added through a new `wasm-bindgen-futures` crate which is a binding between the `futures` crate and JS `Promise` objects. Lots more details can be found in the details of the commit, but one of the end results is that the `web-sys` tests are now entirely contained in the same test suite and don't need `npm install` to be run to execute them! * Review tweaks * Add some bindings for `Function.call` to `js_sys` Name them `call0`, `call1`, `call2`, ... for the number of arguments being passed. * Use oneshots channels with `JsFuture` It did indeed clean up the implementation!
25 lines
613 B
TOML
25 lines
613 B
TOML
[package]
|
|
name = "web-sys"
|
|
version = "0.1.0"
|
|
authors = ["The wasm-bindgen Developers"]
|
|
readme = "./README.md"
|
|
|
|
[lib]
|
|
doctest = false
|
|
test = false
|
|
|
|
[build-dependencies]
|
|
env_logger = "0.5.10"
|
|
failure = "0.1"
|
|
wasm-bindgen-webidl = { path = "../webidl", version = "=0.2.15" }
|
|
sourcefile = "0.1"
|
|
|
|
[dependencies]
|
|
wasm-bindgen = { path = "../..", version = "0.2.15" }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
|
futures = "0.1"
|
|
js-sys = { path = '../js-sys', version = '0.2.0' }
|
|
wasm-bindgen-test = { path = '../test', version = '0.2.15' }
|
|
wasm-bindgen-futures = { path = '../futures', version = '0.2.15' }
|