Conversation
…o wasm32-unknown-unknown
`time.rs` selected the `wasm_bindgen`-based `Instant` for every `wasm32`
target. On WASI targets `wasm_bindgen` is not available and
`std::time::Instant` works, so `biscuit-auth` (and therefore
`biscuit-capi`) failed to build:
error[E0425]: cannot find function `performance_now` in this scope
Gate the shim on `all(target_arch = "wasm32", target_os = "unknown")`
and use `std::time::Instant` everywhere else. Add a CI job running
`cargo check --target wasm32-wasip1` for both crates so the target
cannot silently regress.
This lets `biscuit-capi` be built as a WASI module and hosted by
runtimes such as wazero, wasmtime, or proxy-wasm, without cgo or a
JavaScript environment.
aojea
force-pushed
the
wasi-instant-cfg
branch
from
September 25, 2026 15:27
bb8fcf0 to
1e3cc63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…o wasm32-unknown-unknown
time.rsselected thewasm_bindgen-basedInstantfor everywasm32target. On WASI targetswasm_bindgenis not available andstd::time::Instantworks, sobiscuit-auth(and thereforebiscuit-capi) failed to build:Gate the shim on
all(target_arch = "wasm32", target_os = "unknown")and usestd::time::Instanteverywhere else. Add a CI job runningcargo check --target wasm32-wasip1for both crates so the target cannot silently regress.This lets
biscuit-capibe built as a WASI module and hosted by runtimes such as wazero, wasmtime, or proxy-wasm, without cgo or a JavaScript environment.Assisted by AI