diff --git a/crates/bashkit/src/interpreter/grow_stack.rs b/crates/bashkit/src/interpreter/grow_stack.rs index 273e91098..45d506c40 100644 --- a/crates/bashkit/src/interpreter/grow_stack.rs +++ b/crates/bashkit/src/interpreter/grow_stack.rs @@ -12,7 +12,7 @@ //! segment of [`SEGMENT`] bytes (`stacker`). The depth limits still bound //! how many segments one execution can use, so memory stays bounded. //! -//! On wasm32 `stacker` cannot switch stacks; the wrapper is a plain poll. +//! On wasm `stacker` cannot switch stacks; the wrapper is a plain poll. use std::future::Future; use std::pin::Pin; diff --git a/crates/bashkit/src/time_compat/host_clock.rs b/crates/bashkit/src/time_compat/host_clock.rs index 0cb054bcc..258939b0d 100644 --- a/crates/bashkit/src/time_compat/host_clock.rs +++ b/crates/bashkit/src/time_compat/host_clock.rs @@ -1,6 +1,6 @@ -//! Clock for non-JS `wasm32-unknown-unknown` embedders. +//! Clock for non-JS `wasm{32,64}-unknown-unknown` embedders. //! -//! Important decision: on `wasm32-unknown-unknown` bashkit's default clock is +//! Important decision: on `wasm{32,64}-unknown-unknown` bashkit's default clock is //! `web-time`, which reads `Performance.now()`/`Date.now()` through //! wasm-bindgen. That is right for a JS host and impossible anywhere else — a //! wasm component running in a runtime with no JS engine (wasmtime with no diff --git a/crates/bashkit/src/time_compat/mod.rs b/crates/bashkit/src/time_compat/mod.rs index eb6f9cfab..b2067ce74 100644 --- a/crates/bashkit/src/time_compat/mod.rs +++ b/crates/bashkit/src/time_compat/mod.rs @@ -1,7 +1,7 @@ //! Cross-platform `Instant`/`SystemTime`. //! //! `std::time::Instant`/`SystemTime` panic unconditionally on -//! wasm32-unknown-unknown ("time not implemented on this platform" — no OS +//! `wasm{32,64}-unknown-unknown` ("time not implemented on this platform" — no OS //! clock, no extension point to satisfy; see //! `library/std/src/sys/time/unsupported.rs` in the Rust source). `web-time` //! is a drop-in replacement backed by `Performance.now()`/`Date.now()` via @@ -11,9 +11,10 @@ //! `std::time`'s directly anywhere wall-clock time is read. //! //! `web-time` is only correct when the wasm host *is* a JS host, so it sits -//! behind the `wasm_js` feature. Without it, `wasm32-unknown-unknown` takes -//! [`host_clock`], where the embedder supplies the clock (and the timer, by -//! spinning on it). See that module for the contract. +//! behind the `wasm_js` feature. Without it, the +//! `wasm{32,64}-unknown-unknown` targets take [`host_clock`], where the +//! embedder supplies the clock (and the timer, by spinning on it). See that +//! module for the contract. use std::future::Future; use std::time::Duration; @@ -143,7 +144,7 @@ fn duration_millis(duration: Duration) -> u32 { /// /// `chrono` implements `From` but not /// `From` — same API shape, different type, so the -/// blanket impl doesn't apply on wasm32. Goes through `duration_since` +/// blanket impl doesn't apply on wasm. Goes through `duration_since` /// instead, which both `SystemTime`s support identically. pub(crate) fn to_chrono_utc(t: SystemTime) -> chrono::DateTime { let epoch = || chrono::DateTime::from_timestamp(0, 0).expect("epoch is representable"); @@ -173,7 +174,7 @@ pub(crate) fn to_chrono_utc(t: SystemTime) -> chrono::DateTime { /// Current wall-clock time as a `chrono::DateTime`. /// /// Use instead of `chrono::Utc::now()`: chrono reads the clock through -/// `std::time::SystemTime` (which panics on wasm32-unknown-unknown) or, with +/// `std::time::SystemTime` (which panics on `wasm{32,64}-unknown-unknown`) or, with /// its `wasmbind` feature, through the JS `Date` — neither works for a non-JS /// wasm embedder. This routes through [`SystemTime`], so every target gets the /// clock it actually has.