-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow browsers to specify fd preopens #64
Conversation
Expose a new interface, `wasiOptions`, to accommodate platform-specific configuration for WASI. For now, this is limited to supporting fd preopens in browser environments (since none of Deno, Node, nor Bun support pre-allocating fds in this fashion.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I've got a fix for the test failure in #65; a new version of Deno introduced a regression in the build (tracked as denoland/deno#23721.) |
@kevinbarabash If you have a moment, could you check this PR out and see if it meets your needs? |
@kevinbarabash, if you're unable to verify, then we'll likely merge this if it satisfy's @chrisdickinson's expectations. It's blocking our release though, so we'd like to know if you're interested in confirming. No problem if not! Let's give this a couple more days, and then proceed as we'd like. |
src/polyfills/browser-wasi.ts
Outdated
): Promise<InternalWasi> { | ||
console.log('fileDescriptors = ', fileDescriptors); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisdickinson - does this console.log
need to be here, or just leftover from debugging?
I'm going to close this for now – I think we need to revisit how we support WASI in the JS sdk (esp. since Deno dropped support and Bun only has partial support) |
A continuation of #59.
Fd preopens are specific to
@bjorn3/browser_wasi_shim
. We expose an option to specify them insrc/interfaces.ts
, but the Fd type is specified asany[]
because we can't directly reference that package from Deno/Node TS builds.(This is a v2.0.0 release candidate feature.)