diff --git a/src/lib.rs b/src/lib.rs index a58b5fc..19ec723 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,6 +38,18 @@ //! [`Rc`]: https://doc.rust-lang.org/std/rc/struct.Rc.html //! [`Arc`]: https://doc.rust-lang.org/std/sync/struct.Arc.html //! [`PrivateKeyDer::clone_key()`]: https://docs.rs/rustls-pki-types/latest/rustls_pki_types/enum.PrivateKeyDer.html#method.clone_key +//! +//! ## Target `wasm32-unknown-unknown` with the `web` feature +//! +//! [`std::time::SystemTime`](https://doc.rust-lang.org/std/time/struct.SystemTime.html) +//! is unavailable in `wasm32-unknown-unknown` targets, so calls to +//! [`UnixTime::now()`](https://docs.rs/rustls-pki-types/latest/rustls_pki_types/struct.UnixTime.html#method.now), +//! otherwise enabled by the [`std`](https://docs.rs/crate/rustls-pki-types/latest/features#std) feature, +//! require building instead with the [`web`](https://docs.rs/crate/rustls-pki-types/latest/features#web) +//! feature. It gets time by calling [`Performance.now()`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now). +//! in the browser. According to the underlying [`web-time`](https://github.com/daxpedda/web-time) +//! dependency on which the feature is built, "Emscripten is not supported. WASI doesn't require +//! support as it has it's own native API to deal with std::time." #![cfg_attr(not(feature = "std"), no_std)] #![warn(unreachable_pub, clippy::use_self)]