Commit Graph

64 Commits

Author SHA1 Message Date
e596ef596c Bump to 0.2.48 2019-07-11 15:02:39 -07:00
d32b6a916c 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
2019-07-09 11:14:26 -07:00
2541507789 Add in (unsafe and incorrect) impls of Send/Sync that are now required. 2019-07-06 16:30:29 +01:00
d71ab78fc6 Bump to 0.2.47 2019-06-19 11:14:37 -07:00
5a1dfdf2ab Fixing panic if the Future wakes up after returning Poll::Ready 2019-06-15 15:08:34 +02:00
8fc0a38402 Bump to 0.2.46 2019-06-14 11:44:58 -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
2cc40a27d2 Run fmt and clippy 2019-05-28 09:52:44 -05:00
2a665a92fd Fix compile errors on nightly 2019-05-28 07:05:52 -07:00
137bbdf2e3 Bump to 0.2.45 2019-05-20 09:44:03 -07:00
773c6ff430 Bump to 0.2.44 2019-05-16 07:47:23 -07:00
c00262f210 Fixing some nits 2019-05-04 09:28:54 +02:00
6c58afda01 Addressing feedback 2019-05-04 09:17:29 +02:00
69d7dc24b1 Adding in Futures 0.3 support 2019-05-02 13:48:44 +02:00
f2429be07f Bump to 0.2.43 2019-04-29 08:28:41 -07:00
04a78badc5 Implement Debug for JsFuture 2019-04-20 09:41:59 +03:00
df6e15e3ab Bump to 0.2.42 2019-04-11 07:39:45 -07:00
02394724ea Bump to 0.2.41 2019-04-10 10:53:32 -07:00
a6fe0cefa8 Migrate all crates to the 2018 edition
Most of the CLI crates were already in the 2018 edition, and it turns
out that one of the macro crates was already in the 2018 edition so we
may as well move everything to the 2018 edition!

Always nice to remove those `extern crate` statements nowadays!

This commit also does a `cargo fmt --all` to make sure we're conforming
with style again.
2019-03-26 08:10:53 -07:00
6803c619bb Bump to 0.2.40 2019-03-21 17:08:48 -07:00
228f58dca3 Bump to 0.2.39 2019-03-13 11:02:27 -07:00
a659f27c07 Bump to 0.2.38 2019-03-04 09:11:23 -08:00
e9f423d57e Bump to 0.2.37 2019-02-15 08:16:24 -08:00
802cfedcbd Bump to 0.2.36 2019-02-12 13:19:02 -08:00
d9cf9b3735 Bump to version 0.2.35 2019-02-12 11:36:19 -08:00
894b479213 Migrate wasm-bindgen to using walrus
This commit moves `wasm-bindgen` the CLI tool from internally using
`parity-wasm` for wasm parsing/serialization to instead use `walrus`.
The `walrus` crate is something we've been working on recently with an
aim to replace the usage of `parity-wasm` in `wasm-bindgen` to make the
current CLI tool more maintainable as well as more future-proof.

The `walrus` crate provides a much nicer AST to work with as well as a
structured `Module`, whereas `parity-wasm` provides a very raw interface
to the wasm module which isn't really appropriate for our use case. The
many transformations and tweaks that wasm-bindgen does have a huge
amount of ad-hoc index management to carefully craft a final wasm
binary, but this is all entirely taken care for us with the `walrus`
crate.

Additionally, `wasm-bindgen` will ingest and rewrite the wasm file,
often changing the binary offsets of functions. Eventually with DWARF
debug information we'll need to be sure to preserve the debug
information throughout the transformations that `wasm-bindgen` does
today. This is practically impossible to do with the `parity-wasm`
architecture, but `walrus` was designed from the get-go to solve this
problem transparently in the `walrus` crate itself. (it doesn't today,
but this is planned work)

It is the intention that this does not end up regressing any
`wasm-bindgen` use cases, neither in functionality or in speed. As a
large change and refactoring, however, it's likely that at least
something will arise! We'll want to continue to remain vigilant to any
issues that come up with this commit.

Note that the `gc` crate has been deleted as part of this change, as the
`gc` crate is no longer necessary since `walrus` does it automatically.
Additionally the `gc` crate was one of the main problems with preserving
debug information as it often deletes wasm items!

Finally, this also starts moving crates to the 2018 edition where
necessary since `walrus` requires the 2018 edition, and in general it's
more pleasant to work within the 2018 edition!
2019-02-12 07:25:53 -08:00
078257943d Bump to 0.2.34 2019-02-11 18:58:54 -08:00
e20c4067dc futures: Add a test for creating multiple futures from the same promise 2019-02-04 16:38:21 +01:00
78c4075e40 Bump to 0.2.33 2019-01-18 15:32:17 -08:00
31fdede9fc Bump to 0.2.32 2019-01-16 13:11:13 -08:00
6e08f579a6 add temporary test 2019-01-14 21:04:29 +01:00
4e611c318e fix spawn_local 2019-01-12 17:42:05 +01:00
b04f60cf2b Bump to 0.2.31 2019-01-09 09:17:50 -08:00
194a169c24 Merge pull request #1148 from derekdreery/spawn_local
Spawn local
2019-01-07 10:27:44 -06:00
fbf000a508 Bump to 0.2.30 2019-01-07 07:47:07 -08:00
687fc278a7 Revert previous change. 2019-01-07 14:23:10 +00:00
73913c99f2 Relax bound on Future 2019-01-05 18:10:14 +00:00
25ac4549a0 Docs 2019-01-05 14:37:39 +00:00
c849ef3cf4 Add naive spawn_local implementation + tests
This is just a naive implementation. It seems it can be improved using a
custom task queue, but that can be in a separate PR.
2019-01-05 14:34:50 +00:00
63e3ba722d Bump to 0.2.29 2018-12-04 06:04:47 -08:00
48f4adfa8c Run rustfmt over everything 2018-11-27 12:07:59 -08:00
22ca15f81e Bump to 0.2.28 2018-11-12 09:28:01 -08:00
6dfbb4be89 Bump to 0.2.27 2018-10-29 14:30:33 -07:00
7fad2bf0c8 Bump to 0.2.26 2018-10-29 12:56:37 -07:00
c8f2f77480 Merge pull request #954 from alexcrichton/fix-futures
Defer future execution to the next event loop tick
2018-10-23 16:40:31 +02:00
a1da85a24b Defer future execution to the next event loop tick
Previously whenever a future readiness notification came in we would
immediately start polling a future. This ends up having two downsides,
however:

* First, the stack depth may run a risk of getting blown. There's no
  recursion limit to defer execution to later, which means that if
  futures are always ready we'll keep making the stack deeper.

* Second, and more worrisome in the near term, apparently future
  adapaters in the `futures` crate (namely the unsync oneshot channel)
  doesn't actually work if you immediately poll on readiness. This may
  or may not be a bug in the `futures` crate but it's good to fix it
  here anyway.

As a result whenever a future is ready to get polled again we defer its
polling to the next turn of the event loop. This should ensure that the
current call stack is always drained and we're effectively enqueueing
the future to be polled in the near future.
2018-10-23 07:12:54 -07:00
dd82a3e134 Bump to 0.2.25 2018-10-10 13:19:40 -07:00
c210ccd596 Bump to 0.2.24 2018-10-05 09:53:19 -07:00
7ecf4aae87 cargo +nightly fmt --all
Rustfmt all the things!
2018-09-26 08:26:00 -07:00
f834a427d7 Bump to version 0.2.23 (and js-sys and wasm-bindgen-futures to 0.3.0) 2018-09-26 07:31:54 -07:00