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

Generate a wrapper for calling a WASI executable from JavaScript #16

Closed
Michael-F-Bryan opened this issue Sep 8, 2022 · 1 comment · Fixed by #22 or #26
Closed

Generate a wrapper for calling a WASI executable from JavaScript #16

Michael-F-Bryan opened this issue Sep 8, 2022 · 1 comment · Fixed by #22 or #26
Milestone

Comments

@Michael-F-Bryan
Copy link
Contributor

We want to invoke WASI executables programmatically in JavaScript.

I'm imagining each WASI executable exposing an interface like this:

import Wasi from "@wasmer/wasi";

export async function run(args: string, options?: Partial<RunOptions>): Promise<ExitStatus>;

type RunOptions = {
  wasi: Wasi,
  ...
};

type ExitStatus = {
  code: number,
}

We can reuse the @wasmer/wasi object to do things like the file system, stdin/stdout, environment variables, etc.

@Michael-F-Bryan
Copy link
Contributor Author

Oops, #22 shouldn't have closed this ticket 😅

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