[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua without IO
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 27 Feb 2019 08:47:18 -0300
> I've started work on a (not yet public) project that requires Lua to
> run without any IO / syscall dependencies.
The Lua 5.3 core depends only on these standard C functions:
abort abs floor fmod frexp localeconv longjmp memcmp memcpy pow setjmp
snprintf strchr strcmp strcoll strcpy strlen strpbrk strspn strtod
time
Most of these can be written directly in C if needed. Some are hard:
frexp. Some are impossible: longjmp, setjmp. Some are controlled via
luaconf.h and l_mathop: floor, food frexp, localeconv, pow, snprintf.
In other words, changing the dependency of the Lua core on libc can be
mostly done by editing luaconf.h, as expected.