-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fail to read a file with deno #321
Comments
deno wasi implementation have its own issue denoland/std#3415 |
I guess I'm expecting wasi io to map to deno permissions which might not be the case, it might be that I have to pass relevant config here |
So thats probably it I need to use
but this fails
using deno std implementation (https://deno.land/[email protected]/wasi/snapshot_preview1.ts) works so this maybe is a wasmerjs issue |
Here's a temp workaround for deno: import { WasmFs } from "@wasmer/wasmfs"
// wasmerio uses the deprecated .__proto__ = /*thing*/ to hack the prototype
Object.defineProperty(Object.getPrototypeOf({}), "__proto__", {
get() {
return Object.getPrototypeOf(this)
},
set(value) {
return Object.setPrototypeOf(this, value)
}
})
const wasmFs = new WasmFs() |
@jeff-hykin you don't need that hack instead you can just use |
Cool I didnt know those existed. That said, I'm making a library and I wouldnt want library users to need to add that flag to their runtime. I ended up forking the dependency and getting rid of the proto usage that way. Its pretty much all from node Buffer shims. |
Steps to reproduce
fails with
The text was updated successfully, but these errors were encountered: