Last updated:
0 purchases
fengari lua
fengari-lua: Dart bindings for fengari-web, a Lua 5.3 interpreter. #
Installation #
Add the fengari_lua package to your pubspec:
dependencies:
fengari_lua: ^1.2.0
copied to clipboard
Add fengari-web.js to your html:
<head>
...
<script src="https://github.com/fengari-lua/fengari-web/releases/download/v0.1.4/fengari-web.js"></script>
</head>
copied to clipboard
Usage #
This library comes with bindings for most of the Lua API, see https://www.lua.org/manual/5.3/
It also includes a wrapper which greatly simplifies interaction with Lua states, Example:
import 'package:fengari_lua/lua.dart';
main() {
var state = LuaState();
state.loadString("""
print("Hello, World!")
""");
state.call();
state.close();
}
copied to clipboard
Example #
An example project can be found at https://github.com/PixelToast/dart-fengari-lua/tree/master/example/lua_repl, it
provides a simple web based REPL:
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.