Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

chrisdickinson
Copy link
Contributor

A continuation of #59.

Fd preopens are specific to @bjorn3/browser_wasi_shim. We expose an option to specify them in src/interfaces.ts, but the Fd type is specified as any[] because we can't directly reference that package from Deno/Node TS builds.

(This is a v2.0.0 release candidate feature.)

kevinbarabash and others added 2 commits May 6, 2024 14:32
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.)
Copy link
Contributor

@zshipko zshipko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@chrisdickinson
Copy link
Contributor Author

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.)

@chrisdickinson
Copy link
Contributor Author

@kevinbarabash If you have a moment, could you check this PR out and see if it meets your needs?

@nilslice
Copy link
Member

@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.

): Promise<InternalWasi> {
console.log('fileDescriptors = ', fileDescriptors);
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants