[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bytecode: Safe or not? / luac manual
- From: Stefan Reich <stefan.reich.maker.of.eye@...>
- Date: Mon, 31 Oct 2011 13:26:23 +0000
On Mon, Oct 31, 2011 at 12:46 PM, Axel Kittenberger <email@example.com> wrote:
> Since lua-jit only supports source code, why use byte code at all?
Let me explain the principle once more.
Script S is run on machine A until it calls freeze().
It is then serialized into a Pluto image (or an image made by a future
library that is even better than Pluto).
The image is sent to machine B - which may or may not "trust" machine
A, it doesn't matter much.
There, it is deserialized and script S continues to compute. (Safely,
because of sandboxing.)
Later, the script may travel somewhere else again, of course.
Pluto requires saving and loading bytecode, so we need that ability
for this to work.
> In case of speed: I suppose the state of affairs is that bytecode is
> only loaded faster if not checked. Any speedadvantage to parsing is
> eaten up by through untrusted bytecode checking. In case of size: how
> much smaller is bytecode compared to source code that is say
> precompile-stripped of comments etc. and gzipped if at all?
Neither speed nor size are particularly important at this point.
Important, right now, is to get the system working and see Lua scripts