lua_dardo_async 0.0.4 copy "lua_dardo_async: ^0.0.4" to clipboard
lua_dardo_async: ^0.0.4 copied to clipboard

A Lua virtual machine written in Dart, which implements Lua5.3 version, with async functions.

example/example.dart

import 'package:lua_dardo_async/lua.dart';

Future<void> main(List<String> arguments) async {
  LuaState state = LuaState.newState();
  await state.openLibs();

  state.registerAsync("wait", (ls) => Future.delayed(Duration(seconds: 1), () => 0));

  state.loadString(r'''
   print("before the wait")
   wait()
   print("after the wait")
   ''');
  state.call(0, 0);
  print("end of the script");
}
0
likes
115
points
62
downloads

Publisher

unverified uploader

Weekly Downloads

A Lua virtual machine written in Dart, which implements Lua5.3 version, with async functions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

sprintf

More

Packages that depend on lua_dardo_async