Description
Command-line interface for Lua.
Description
Provides an embeddable command-line interface for Lua. The interface is compatible with the standard Lua interpreter, i.e., the lua
executable provided in a default Lua installation.
README.md
hslua-cli
Library that allows to embed a standalone Lua interpreter into a larger program. The provided command-line interface is mostly compatible with that of the default lua
executable that ships with Lua.
Example
import HsLua.Core as Lua (Exception, openlibs, run)
import HsLua.CLI (Settings (..), runStandalone)
-- | Run a default Lua interpreter.
main :: IO ()
main = do
let settings = Settings
{ settingsVersionInfo = "\nembedded in MyProgram"
, settingsRunner = \action -> run $ do
openlibs
action
}
runStandalone @Lua.Exception settings