You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: keep wasm-bindgen imports out of the canister Wasm
`dfx deploy` was rejected by the replica:
Wasm module has an invalid import section. Module imports function
'__wbindgen_describe' from '__wbindgen_placeholder__' that is not
exported by the runtime.
`web-time` re-exports `std::time` on every target except
wasm32-unknown-unknown, where it reads the browser clock through `js-sys`.
That backend pulls in wasm-bindgen, whose `__wbindgen_placeholder__` and
`__wbindgen_externref_xform__` imports the IC runtime does not export.
Nothing here depends on `web-time` directly; it arrives under
`ic_auth_verifier` -> `ic-certificate-verification` -> `cached`. `cached`
depends on it unconditionally and uses `web_time::Instant` only in its timed
cache stores, while the certificate verifier uses `SizedCache`, which keeps no
time. So no clock is ever read inside the canister and `std::time` is a
faithful substitute.
The durable fix belongs upstream: `ic_auth_verifier` takes
`ic-certificate-verification` as a non-optional dependency, so every canister
using it inherits this.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>