async-rs / futures-timer

Heap-based async timers
https://docs.rs/futures-timer
Apache License 2.0
211 stars 40 forks source link

Add wasm-bindgen feature to README/docs #64

Open qdot opened 3 years ago

qdot commented 3 years ago

Just found out there's a wasm-bindgen feature via the PR then reading the Cargo.toml. Would be nice to have this in the README.

najamelan commented 3 years ago

Wouldn't it be better to automatically turn these dependencies on on wasm? AFAICT the library can't work on wasm without them. It would save users from having to fiddle with feature flags.

qdot commented 3 years ago

Sure, that'd work too.

dariusc93 commented 6 months ago

Wouldn't it be better to automatically turn these dependencies on on wasm? AFAICT the library can't work on wasm without them. It would save users from having to fiddle with feature flags.

I agree that it would be better to have it enabled based on the target, especially since it doesnt fail to build on non-wasm32 targets, it makes it hard to debug the time not implemented on this platform panic message when Instant or SystemTime is used from std due to Instant being used by the native module.