README.md (1181B)
1 # luad 2 3 A server that provides pre-warmed Lua VMs to clients connecting over 4 unix sockets 5 6 * no waiting for the interpeter to load 7 * share read-only pages between Lua processes 8 9 Lua is small enough that this is probably meaningless on any 10 reasonably powerful computer, but conversely: Lua is useful on 11 computers that are unreasonably feeble. This utility was written for 12 Liminix, but it may be useful elsewhere too. 13 14 ## what it does 15 16 * start Lua 17 * accept unix datagram socket commands 18 * fork a child for each peer socket and run the requested lua script 19 20 ## how to use it 21 22 $ LUAD_SOCKET_PATH=/var/run/luad/socket luad prelude.lua 23 24 $ LUAD_SOCKET_PATH=/var/run/luad/socket luac script.lua arg1 arg2 ... 25 26 The pathname of a Lua script may optionally be passed to luad. It will 27 be loaded into the interpreter before it is forked, so whatever it 28 does will be available in the children. 29 30 ## small print 31 32 * WIP. Not finished. Use at own risk, etc 33 34 * tested only on Linux. Needs SCM_RIGHTS to send unix file descriptors 35 across processes, which seems to be have [implementation quirks on 36 different unix flavours](https://gist.github.com/kentonv/bc7592af98c68ba2738f4436920868dc)