lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I want to be able to, in lua, write assembly code, which the library
then assembles, registers with the lua vm, which I can then call

I've never used it myself and I don't know if a Lua binding exists for
it, but maybe the GNU Lightning project could be useful to you?

GNU lightning is a library that generates assembly language code at
run-time; it is very fast, making it ideal for Just-In-Time
compilers, and it abstracts over the target CPU, as it exposes to the
clients a standardized RISC instruction set inspired by the MIPS and
SPARC chips.

For more information:

Alternatively, there's a binding to TCC (Tiny C Compiler) available for
Lua at and according to TCC includes an assembler.

 - Peter Odding