-
-
Notifications
You must be signed in to change notification settings - Fork 225
Experimental support for compiling grammars to Wasm #505
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
Conversation
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.
Pull Request Overview
This PR introduces experimental support for compiling grammars to WebAssembly by adding a new package and updating various dependency versions across the repository.
- Introduces the new package "wasm" with a WasmMatch class for grammar matching via WebAssembly.
- Upgrades AVA from version ^4.3.3 to ^6.0.0 in multiple packages and examples to ensure consistency and leverage new test capabilities.
- Adds AVA configuration in packages/ohm-js to improve test watch behavior.
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/wasm/package.json | Added new package with basic configuration; consider populating the description field. |
| packages/ohm-js/package.json | Upgraded AVA version and added new AVA watchMode configuration. |
| packages/cli/package.json | Upgraded AVA version in the devDependencies. |
| examples/typescript/package.json | Upgraded AVA version for consistency in testing. |
| examples/simple-lisp/package.json | Upgraded AVA version for consistency in testing. |
| examples/operators/package.json | Upgraded AVA version for consistency in testing. |
| examples/markdown/package.json | Upgraded AVA version for consistency in testing. |
| examples/ecmascript/package.json | Upgraded AVA version for consistency in testing and added AVA configuration. |
Files not reviewed (1)
- packages/es-grammars/package-lock.json: Language not supported
| { | ||
| "name": "wasm", | ||
| "version": "1.0.0", | ||
| "description": "", |
Copilot
AI
May 9, 2025
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.
[nitpick] Consider providing a meaningful description for the wasm package to better communicate its purpose and functionality to users and potential contributors.
| "description": "", | |
| "description": "A package for working with WebAssembly (Wasm), including emitting and processing Wasm modules.", |
Initial support for WebAssembly, as describe in #503.
Adds a new package which exposes a
WasmMatchclass. Internally,WasmMatchercompiles the grammar to a WebAssembly module that exports amatchmethod.Working so far:
Not yet: