Skip to content


Subversion checkout URL

You can clone with
Download ZIP
LuaRPC for Lua 5.1.x
C Lua

Correct issues with remote indexing and catch incorrect calls for LuaRPC

helper_remote_index() contained an error which allowed for incorrect
calculation of the string length to be sent. This should now be
fixed. Additionally, read_cmd_call() did not check whether indexing
was successful at each step, we now check whether the indexed result
is callable or a table and attempt to provide an indication of the
type of error made by the user.
latest commit 123eb319b1
@jsnyder authored
Failed to load latest commit information.
doc Added flow chart of data formatting negotiation.
logo Initial hacking on LuaRPC.
rockspec Add a rockspec for building LuaRPC (currently builds socket variant).
LICENSE Initial hacking on LuaRPC.
Makefile Switch to using Makefile to include define for nanolseep.
PROTOCOL Update notes about status.
README Update build instructions, enhance makefile to have socket, serial ta…
TODO Update notes about status.
cexcept.h Swap out exception implementation for more common cexcept.h.
luarpc.c Correct issues with remote indexing and catch incorrect calls for LuaRPC
luarpc.h Initial hacking on LuaRPC.
luarpc_rpc.h Fix helper creation to reference required objects, preventing prematu…
luarpc_serial.c Sync code with eLua codebase.
luarpc_socket.c Arg checking cleanup and enable TCP_NODELAY.
platform_conf.h Switch build system to use premake 4. Makefile from repository should…
serial.h Sync code with eLua codebase.
serial_posix.c Switch to using Makefile to include define for nanolseep.
serial_win32.c Sync code with eLua codebase.
showtable.lua Include a function to show table contents recursively.
test-client.lua Correct issues with remote indexing and catch incorrect calls for LuaRPC
test-server.lua clean up spaces
type.h Sync code with eLua codebase.


Lua-RPC is a Lua library to allow simple remote procedure calling. That is, a
Lua script running on one machine can call functions from a script that is
running on another machine.

This is version 0.3, a pre-alpha release.

The goal of this project is to create an RPC module for Lua that is both
simple and light on resource usage. In addition, the module intends to
maintain separation between the actual RPC protocol and the underlying
mechanism that transmits bytes between client and server. This is done in
order to enable the use of the protocol over a variety of link types including
sockets and RS-232.


In order to build the module, just type:

Serial Mode:
make serial

TCP/IP (Socket) Mode:
make socket

NOTE: If you switch between these configurations, make sure to do a make clean between, as it seems to think the target is up to date from the previous build.

This should succeed if you have Lua already installed on a Linux or Mac OS X
system. If it does not succeed, feel free to contact me at

Windows support is somewhat implemented, though not yet ready.


The result of the build is a .so file that within a Lua script, one should be
able to simply do a:


with the module in the Lua path, and use the module as suggested in
test-client.lua and test-server.lua.

Ensure that your scripts reflect the type of enabled "transport" in use.

Russell L. Smith (2001):
Original work and project:

James Snyder (2009+):
- Port to Lua 5.x
- "transport" abstraction 
Something went wrong with that request. Please try again.