hslua-cli: Command-line interface for Lua

[ foreign, library, mit ] [ Propose Tags ]

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.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Automatic Flags
NameDescriptionDefault
executable

Compile hslua standalone executable.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.1.0, 1.2.0
Change log CHANGELOG.md
Dependencies base (>=4.9.1 && <5), bytestring, hslua-cli, hslua-core (>=2.1 && <2.3), hslua-marshalling (>=2.1 && <2.3), lua (>=2.1 && <2.3), text (>=1.2 && <2.1) [details]
License MIT
Copyright © 2022 Albert Krewinkel
Author Albert Krewinkel
Maintainer Albert Krewinkel <albert@hslua.org>
Category Foreign
Home page https://hslua.org/
Bug tracker https://github.com/hslua/hslua/issues
Source repo head: git clone https://github.com/hslua/hslua(hslua-cli)
Uploaded by tarleb at 2022-09-27T08:55:41Z
Distributions NixOS:1.2.0
Executables hslua
Downloads 166 total (58 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-09-27 [all 1 reports]

Readme for hslua-cli-1.2.0

[back to package description]

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