Hacker News new | ask | show | jobs
by 0x000000E2 1864 days ago
There's a lot of JIT's using LLVM for code generation. Including some shader compilers, Azul's JVM, and I believe Safari's JS.

DynASM is another popular library, used by Lua and others.

Crane lift was originally designed for WASM but Rust developers have taken a liking to it

My favorite flavor of code-gen is within VM based languages though. I'm most familiar with Java, where there's a rich set of libraries for generating code at build and run time. Codegen within JIT'ed languages is really cool because the new code is patched into the existing code with profile guided optimizing compilers.

A lot of popular libraries use it. And it's nice to know it's there if you need to build up say a deserializer or rules engine with maximum performance.