Replies: 2 comments 5 replies
-
I would say the big picture is:
The main factor is probably what language you are designing. If it uses GC and intends to compile to Wasm GC, then I think Binaryen is a good choice. In all other cases I think LLVM is the better choice (but it's still worth using Binaryen after LLVM runs, to further optimize the wasm output by ~15%). Specific issues are:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
How does it compare nowadays 2 years later? If we'd like to make a language that compiles to both native and Wasm, what would you recommend and how would Binaryen fit in? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm thinking about designing a new programming language and compiling it to wasm.
As a compiler backend, Binaryen and LLVM are both capable of converting some IR to wasm, but I'm not sure which one to choose for my project.
I'm more familiar with LLVM and know it produces really well optimized code. On the other hand, Binaryen is used by notable projects like AssemblyScript and Grain, so I guess it should work well too.
I'd appreciate it if you could shed some light on the differences between Binaryen and LLVM as a compiler backend, like optimization capabilities, compile time, etc. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions