Commit bf2be52
Fix wasm32 build by gating MultiFileSession on non-wasm targets (#8612)
## Rationale for this change
The `MultiFileSession` holds a `moka` cache that reads
`std::time::Instant::now()` during construction. The `Instant` type is
unsupported on `wasm32` targets and panics with "time not implemented on
this platform". Since multi-file scanning is not available on wasm
anyway, this change gates the `MultiFileSession` registration behind a
`#[cfg(not(target_arch = "wasm32"))]` guard to allow the wasm32 build to
succeed.
## What changes are included in this PR?
Added a `#[cfg(not(target_arch = "wasm32"))]` attribute to the
`MultiFileSession` registration in `vortex/src/lib.rs` to prevent
instantiation of the session on wasm32 targets where
`std::time::Instant` is not available.
## What APIs are changed? Are there any user-facing changes?
No public APIs are changed. This is a build fix that prevents a panic on
wasm32 targets. Multi-file scanning functionality remains unavailable on
wasm, as it was before.
https://claude.ai/code/session_01P5VUBo8DhakxhhF1Ux2Kte
---------
Signed-off-by: Robert <robert@spiraldb.com>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 88222ac commit bf2be52
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
305 | 309 | | |
306 | 310 | | |
307 | 311 | | |
| |||
0 commit comments