-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add webassembly language #6429
base: main
Are you sure you want to change the base?
Add webassembly language #6429
Conversation
objdumper=llvm-objdump | ||
objdumperType=llvm |
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.
I used llvm-objdump
here because wasmtime supports a --target=<triple>
parameter that cross-compiles WASM modules for other architectures. The problem is that when using objdump
it then can't disassemble the resulting file. I'm not sure if there is a better solution to handle these cases
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.
Hi! Thanks a lot for taking the time to add support for this, we really appreciate it :)
I have a few minor comments on the config files, but other than that, this looks great!
The previous regex had a exponential backtracking issue under some inputs.
I'd love to have Wasmer supported as well! Let me know if we can help with that :) |
Awesome! I already have a WIP patch locally adding wasmer! I was waiting to get this merged in before proposing that. |
|
||
escapes: /^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, | ||
|
||
qualifiedSymbols: /^(?:[^\\/[\]\d\s"#'(),;@^`{}~][^\\[\]\s"(),;@^`{}~]*)*(?=[\\[\]\s"(),;@^`{}~]|$)/, |
Check failure
Code scanning / CodeQL
Inefficient regular expression High
👋 Hey,
This PR adds support for the Webassembly Text Language (#1871). Currently it only supports the wasmtime compiler, but it should be possible to add others (i.e. v8 / wasmer / etc...).
It looks like the monaco does not support the WAT language, so I've added a simple mode for it, that is mostly copied from the clojure mode with some changes. From what I've tested it seems to work reasonably well.