Open sharkdp opened 2 years ago
Sounds like an interesting experiment, but I don't know if we'd want to require an unwieldy dependency like LLVM. :) Perhaps we could at something like https://c9x.me/compile/ instead?
Now that I think about it, LLVM IR generation could be really nice and interesting to have as an optional disabled-by-default feature. Who knows, maybe we can compile Numbat code to executables? :)
The tricky thing is probably that you also need to ship a runtime. Compiling something like 1.2 + 3.4
to machine code is not hard. But compiling print("hello world")
needs some thought :-)
Instead of bytecode, simply(?) generate LLVM IR? https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.html