[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: compiling native binaries
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 10 Apr 2001 20:57:01 -0300 (EST)
>Would it be at all possible to compile native binaries from lua source? I think it'd be neato to make a kernel/OS that uses lua as its system programming language. :-)
You can always use luac and bin2c (available at lua/etc) and convert a
precompiled chunk into a memory buffer that is loaded at the start of your
main program. The whole process can of course be automated with make.
Real compilation to native code is likely to be hard and perhaps not really
worth it because of Lua's semantics: you'd have to call a function for almost
anything, given that tag methods may intervene at any time and there's no easy
static method for predicting this.
--lhf