-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[REQUEST] Web Assembly JIT compiler #1871
Comments
Please look at the issue #264 Im adding a webassembly thing to it right now. I am adding a way to do it through c++ -> clang -> wasm -> d8 Although I could also use wabt to do it from .wat files directly. But I have had wabt fail me before this, so Ill do that later. I could do spydermonkey but I haven't ever compiled it before, unlike d8. But I would like to compare spydermonkey and d8 too. |
👋 Hey, This PR adds support for the Webassembly Text Language (#1871). Currently it only supports the [wasmtime](https://github.com/bytecodealliance/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. ![image](https://github.com/compiler-explorer/compiler-explorer/assets/1357143/9e38b28e-235c-47e5-a71e-50217e5d2056) --------- Co-authored-by: Patrick Quist <partouf@gmail.com>
👋 Hey, This PR adds support for the Webassembly Text Language (#1871). Currently it only supports the [wasmtime](https://github.com/bytecodealliance/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. ![image](https://github.com/compiler-explorer/compiler-explorer/assets/1357143/9e38b28e-235c-47e5-a71e-50217e5d2056) --------- Co-authored-by: Patrick Quist <partouf@gmail.com>
👋 Hey, This PR adds support for the Webassembly Text Language (compiler-explorer#1871). Currently it only supports the [wasmtime](https://github.com/bytecodealliance/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. ![image](https://github.com/compiler-explorer/compiler-explorer/assets/1357143/9e38b28e-235c-47e5-a71e-50217e5d2056) --------- Co-authored-by: Patrick Quist <partouf@gmail.com>
It is possible to get native jitted code for web assembly(wasm) out of javascript engines like SpiderMonkey and V8. Here is an example.
I think it makes sense to add wat(wasm text)-to-x86 explorer in the future to study optimization opportunities. One could use CE to generate wat and then copy-paste that wat in the second window and get native assembly.
One way to get native assembly is to run v8 with --print-wasm-code option. There's also a way using v8's internals to get custom output.
Adding that would involve installing wasm tools for (wat -> wasm) conversion and one of the javasctipt engines. I personally tried using v8 and it wasn't difficult in terms of installing/compiling from source compared to llvm/clang. Although that would also involve pulling some google internal tools like depot_tools.
Thanks,
Anton
The text was updated successfully, but these errors were encountered: