-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Publish wasm #301
Comments
Hi, I would like to know if there is a reason to close this issue. Are there any plans to release wasm version? |
I haven't found the time to properly maintain the wasm version. What's your usecase? |
I'd like to add Oxc parser to my AST Explorer |
I noticed that the playground's
Yet there doesn't seem to be a Edit: Actually, I see now, it's the
|
@Boshen We were also exploring whether it would be a suitable parser in
@Boshen Off the top of your head, what are the current issues with it that require further maintenance/etc? Do you consider it not up to date/usable/etc? |
Things could work if you intend to write everything in Rust, otherwise it's not going to work on the JS side. We lack all the things you need on the JS side after looking at your requirements. |
We will need the wasm binding for js parser and the AST query and run them on JS side. So the main blocker is that there is no enough resources and maintainers for wasm version? |
We don't have a AST visitor on the JS side.
Kind of, it's gonna be a lot harder to maintain because there are currently no TypeScript types for the AST on the JS side. |
Is using a WASM plugin a good idea? |
To be honest I'm still not sure whether the scope of this project should expand to supporting wasm and napi ... |
While I appreciate the effort to keep the scope focused, I believe the oxc ecosystem could benefit from supporting multiple use cases with its components. That way it would attract new contributors and potentially alleviate some of the maintenance burden. This would also be advantageous for the community, as it would eliminate the need to duplicate efforts in developing lexers, parsers, traversers, etc. In my case, I'm working on rewriting some JS/TS, from both internal JS and external systems (over network). oxc came to mind as a potential solution. |
Done! https://www.npmjs.com/package/@oxc-parser/wasm I used |
Thanks for your excellent work! However, the usage of docs may be wrong. parseSync(code, { filename: "test.ts" });
> Error: expected instance of ParserOptions The parser options cannot be a plain object. If we pass a class, there's an error once get/set value. const parserOptions = new ParserOptions()
parserOptions.filename = options?.filename || 'foo.ts'
> Error: null pointer passed to rust |
@sxzz I released @oxc-parser/wasm@0.0.4 and updated the README https://www.npmjs.com/package/@oxc-parser/wasm wasm FFI is really confusing, I'm still unsure whether I fixed it or not, but "it works on my machine" at least. |
Great, it works now. P.S. Oxc parser is already supported by my AST Explorer version. |
No description provided.
The text was updated successfully, but these errors were encountered: