From ff6ab9f75da6a6b067e060c019871beed70e877b Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Fri, 20 Nov 2026 20:47:56 +0000 Subject: [PATCH 1/3] docs: name wasm64 in time_compat docs Follow-up to #2959, which widened the time_compat cfgs to target_family = "wasm" but left the docs saying wasm32 only. --- crates/bashkit/src/time_compat/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bashkit/src/time_compat/mod.rs b/crates/bashkit/src/time_compat/mod.rs index eb6f9cfab..2b84d9022 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,7 +11,7 @@ //! `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 +//! behind the `wasm_js` feature. Without it, `wasm{32,64}-unknown-unknown` take //! [`host_clock`], where the embedder supplies the clock (and the timer, by //! spinning on it). See that module for the contract. @@ -143,7 +143,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 +173,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. From e977c0fd0a96483684432ecc2eb73868ad319c9e Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Fri, 20 Nov 2026 20:54:28 +0000 Subject: [PATCH 2/3] docs: name wasm64 in host_clock and grow_stack docs --- crates/bashkit/src/interpreter/grow_stack.rs | 2 +- crates/bashkit/src/time_compat/host_clock.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 From e1ff721e0ac73bb93a3395984337244693980692 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Fri, 20 Nov 2026 20:58:15 +0000 Subject: [PATCH 3/3] docs: fix verb agreement in time_compat docs --- crates/bashkit/src/time_compat/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/bashkit/src/time_compat/mod.rs b/crates/bashkit/src/time_compat/mod.rs index 2b84d9022..b2067ce74 100644 --- a/crates/bashkit/src/time_compat/mod.rs +++ b/crates/bashkit/src/time_compat/mod.rs @@ -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, `wasm{32,64}-unknown-unknown` take -//! [`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;