3 ms·
I'm not an expert, but there are C bindings: I was able to play around with a toy compiler[1] in Lua using lualvm[2] I also know of at least one compiler[2] th
by chc4 6y ago
I'm not an expert, but there are C bindings: I was able to play around with a toy compiler[1] in Lua using lualvm[2]
I also know of at least one compiler[2] that actually emits textual IR, and then builds and links .obj files from that with the LLVM toolchain...but I think that's just a bunch of work, would be hard to debug, and generally just a bad idea.
1: https://github.com/chc4/solar/blob/master/src/jit.lua https://github.com/chc4/solar/blob/master/src/jit.lua
2: https://github.com/gilzoide/lualvm https://github.com/gilzoide/lualvm which I actually had to fork to https://github.com/chc4/lualvm https://github.com/chc4/lualvm for a small bugfix
3: https://github.com/FeepingCreature/fcc/blob/master/llvmfile.d https://github.com/FeepingCreature/fcc/blob/master/llvmfile.... by 'feepingcreature