lua-users home
lua-l archive

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

> 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

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.