-
Notifications
You must be signed in to change notification settings - Fork 29
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
Leverage WASI Preview2 #52
Comments
@eduardomourar thanks for pinging me about this. I started to look into this today (I first wanted to to get our support finished for preview1) and I have a couple of questions. I hope you don't mind if I ask them. May some background first: also we implement a WASI host in JavaScript things are special for us since we want to wire them up to VS Code's extension host API. So we can't simply take a Node.js or Browser implementation (see here for some more details: https://code.visualstudio.com/blogs/2023/06/05/vscode-wasm-wasi). For preview1 I converted the corresponding witx files per hand to d.ts files simply to better understand how everything works. For preview2 I want to convert them automatically since it would allow me to generate more code to hook things up to the VS Code API. So my concrete questions are:
|
|
I started looking at jco and what I need to do for VS Code. Since things will be special in VS Code (it is not a pure browser nor a pure Node.js environment) I am currently exploring the following approach:
A first implementation cut is in branch dbaeumer/monetary-ox-cyan. Interesting might be:
Please note that this is all work in progress however I think that parts of the canonical API implementation might be useful for projects that use TypeScript. It is very likely not useful for project that use pure JavaScript since I use some TS typing rules to make the usage side easier (see for example how Variants are handle using
|
I cleaned up the implementation and add the last two types (list and char). Is in the branch in head. |
I believe a lot could be simplified by leveraging the WASI preview2 + WIT work that is happening here. From the JavaScript binding generation perspective, you might have a look in this repo too: https://github.com/bytecodealliance/jco.
The text was updated successfully, but these errors were encountered: