Skip to content

Split up callback and future/stream APIs. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ version = "0.1.0"
gloo-timers = { version = "0.1.0", path = "crates/timers" }
gloo-console-timer = { version = "0.1.0", path = "crates/console-timer" }

[features]
default = []
futures = ["gloo-timers/futures"]

[workspace]
2 changes: 1 addition & 1 deletion crates/console-timer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The measurement ends when the timer object goes out of scope / is dropped.

```no_run
use gloo_console_timer::ConsoleTimer;
use gloo_timers::Timeout;
use gloo_timers::callback::Timeout;

// Start timing a new operation.
let timer = ConsoleTimer::new("foo");
Expand Down
16 changes: 14 additions & 2 deletions crates/timers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@ authors = ["Rust and WebAssembly Working Group"]
edition = "2018"

[dependencies]
wasm-bindgen-futures = "0.3.14"
wasm-bindgen = "0.2.37"
js-sys = "0.3.14"
futures = "0.1.25"

[dependencies.futures_rs]
package = "futures"
version = "0.1.25"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.3.14"
optional = true

[dependencies.web-sys]
version = "0.3.14"
features = [
"Window",
]

[features]
default = []
futures = ["futures_rs", "wasm-bindgen-futures"]


[dev-dependencies]
wasm-bindgen-test = "0.2.37"
Loading