https://github.com/pingbird/dart-fengari-lua
Bindings for Lua in Dart
https://github.com/pingbird/dart-fengari-lua
Last synced: 6 months ago
JSON representation
Bindings for Lua in Dart
- Host: GitHub
- URL: https://github.com/pingbird/dart-fengari-lua
- Owner: pingbird
- License: mit
- Created: 2019-06-18T05:40:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-10T04:00:42.000Z (over 5 years ago)
- Last Synced: 2025-11-15T18:04:08.008Z (8 months ago)
- Language: Dart
- Size: 32.2 KB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fengari-lua: Dart bindings for fengari-web, a Lua 5.3 interpreter.
## Installation
1. Add the fengari_lua package to your pubspec:
```yaml
dependencies:
fengari_lua: ^1.2.0
```
2. Add fengari-web.js to your html:
```html
...
```
## 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:
```dart
import 'package:fengari_lua/lua.dart';
main() {
var state = LuaState();
state.loadString("""
print("Hello, World!")
""");
state.call();
state.close();
}
```
## 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:
