Skip to content

Commit

Permalink
Promise-related bugfixes and an update to futures 0.2 (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pauan authored and koute committed Apr 22, 2018
1 parent d7f4b27 commit a41d243
Show file tree
Hide file tree
Showing 6 changed files with 334 additions and 196 deletions.
9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ build = "build.rs"
discard = "1.0.3"
serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true }
futures = { version = "0.1.18", optional = true }
futures-core = { version = "0.2.0", optional = true }
futures-channel = { version = "0.2.0", optional = true }
futures-util = { version = "0.2.0", optional = true }

stdweb-derive = { version = "0.4", path = "stdweb-derive" }

Expand All @@ -26,10 +28,11 @@ serde_json = "1"
serde_derive = "1"

[features]
default = ["serde", "serde_json", "futures"]
default = ["serde", "serde_json"]
nightly = []
web_test = []
experimental_features_which_may_break_on_minor_version_bumps = []
futures-support = ["futures-core", "futures-channel", "futures-util"]
experimental_features_which_may_break_on_minor_version_bumps = ["futures-support"]
"docs-rs" = []

[target.wasm32-unknown-unknown.dependencies]
Expand Down
12 changes: 9 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,14 @@ extern crate stdweb_internal_macros;
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
pub use stdweb_internal_macros::js_export;

#[cfg(feature = "futures")]
extern crate futures;
#[cfg(feature = "futures-support")]
extern crate futures_core;

#[cfg(feature = "futures-support")]
extern crate futures_util;

#[cfg(feature = "futures-support")]
extern crate futures_channel;

#[macro_use]
extern crate stdweb_derive;
Expand Down Expand Up @@ -181,7 +187,7 @@ pub use webcore::discard::DiscardOnDrop;
pub use webcore::promise::{Promise, DoneHandle};

#[cfg(all(
feature = "futures",
feature = "futures-support",
feature = "experimental_features_which_may_break_on_minor_version_bumps"
))]
pub use webcore::promise_future::PromiseFuture;
Expand Down
Loading

0 comments on commit a41d243

Please sign in to comment.