lua-users home
lua-l archive

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


Am 25.10.19 um 04:41 schröbte Russell Haley:
Hello,


Hi!


So, now comes the torrent of questions:
- Has anyone used Lua with Keil?

I haven't, but it seems llvm/clang based with complete c++14 support, so you should be fine.

- Has anyone used Sol2 with Keil? (And would the wise and mysterious
Phantom Derp Storm support it?)

Same.

However, you can't completely disable exceptions when using Sol2, so you should check whether exceptions are already enabled in your code base.

- With 1 Mb of Ram at my disposal, how much of Lua would be wise to put on
the target?

1 Mb RAM is plenty. You should go for 32 bit ints and floats though, because this will halve your memory needs (pointers are 32 bit, too), and you probably don't have 64bit float hardware anyway. Coroutines are expensive, btw.

- Given the prior question, should I bother interpreting on the PC host?
- The Sol2 single file is 800Kb. Can Sol2 be chopped down? How small? What
would be wise?

This is templated source code. Most of it won't end up in your image anyway.

- Has anyone ever shipped byte code across a serial port? How bad an idea
do you think that is?

You will need a custom luac on the host side (which is a constant source of error and confusion if you have native Lua installed as well), and you can forget sandboxing on the embedded device. The parser is not that big, so I wouldn't bother.


Cheers,
Russ



Philipp