mirror of
https://github.com/fluencelabs/wasm-timer
synced 2025-04-25 11:12:12 +00:00
Only use wasm-bindgen with unknown OS
This commit is contained in:
parent
fd76bd4282
commit
6fa4d915fe
@ -2,17 +2,17 @@
|
||||
name = "wasm-timer"
|
||||
edition = "2018"
|
||||
description = "Abstraction over std::time::Instant and tokio_timer that works on WASM"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/tomaka/wasm-timer"
|
||||
|
||||
[target.'cfg(any(target_arch = "wasm32"))'.dependencies]
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
|
||||
futures = "0.1"
|
||||
js-sys = "0.3.14"
|
||||
send_wrapper = "0.2"
|
||||
wasm-bindgen = "0.2.37"
|
||||
web-sys = { version = "0.3.14", features = ["Performance", "Window"] }
|
||||
|
||||
[target.'cfg(not(any(target_arch = "wasm32")))'.dependencies]
|
||||
[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
|
||||
tokio-timer = "0.2"
|
||||
|
@ -18,12 +18,12 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
||||
pub use std::time::{Instant, SystemTime, UNIX_EPOCH};
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
||||
pub use tokio_timer::*;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
||||
pub use wasm::*;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
||||
mod wasm;
|
||||
|
@ -19,7 +19,7 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#![cfg(target_arch = "wasm32")]
|
||||
#![cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
||||
|
||||
use futures::{prelude::*, sync::oneshot, try_ready};
|
||||
use std::{error, fmt};
|
||||
|
Loading…
x
Reference in New Issue
Block a user