Conversation
noise64
approved these changes
Apr 29, 2026
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.
Resolves #91
Root cause: During wizer pre-init, the wasm-rquickjs runtime evaluates the bundled user JS. When that bundle contains code like exa-js's
node-fetchdep — which hastry { require('encoding') } catch {}at module-eval time — the JS require shim walksnode_modulesviafs.readFileSync→ Rustfs_open→std::fs::OpenOptions::open. The first such call triggerswasi-libc's lazy preopen-cache population against the empty wizer host environment (which provides no preopens), and the broken empty-cache state gets snapshotted by Wizer. After restore,std::fs::*operations fail withENOENT scandir ‘/'even though wasmtime has provided real preopens.Fix:
New
WIZER_ACTIVE: AtomicBoolstatic +is_wizer_active()helper, set to true for the duration ofwizer_initialize().Path-based fs ops (
fs_open,fs_stat,fs_lstat,fs_readdir,fs_realpath,fs_readlink,fs_access) short-circuit with a syntheticENOENT wizer_enoent_objwhen the flag is set, never invokingstd::fs::*and so never poisoning wasi-libc's preopen cache.