One of the key concepts behind Moai SDK is that of hosts.
This is a neat solution that the folks from Zipline proposed for Moai SDK and basically states that Moai SDK provides a Lua interpreter and a C++ interface to the outside world. This interface is called AKU , and can be found in the Moai SDK source code.
Whenever you want to create a game for a specific platform, your host is in charge of configuring the input and sending input events to Moai, solving any threading issues from that platform, and also providing all platform-specific logic and Lua extensions along with an OpenGL canvas for rendering.
In this way, a game built in Moai is potentially deployable to all platforms that support C++ and OpenGL (well, not all OpenGL, just ...