Is there a way to bind dart to lua?
Solution 1
Okay, so in the end I didn't use lua at all. I choose to build my own script language and embedded it into Dart, to achieve the goal I wanted in the beginning: Two way binding(invoke script language function from host language and invoke host language function in scripting).
This is the script language I am currently using in Dart: https://github.com/hythl0day/HetuScript
Solution 2
You can use Lua Dardo and follow this example to bind Dart and Lua.
hythloday
Updated on December 15, 2022Comments
-
hythloday over 1 year
Or is it possible to scripting in Dart/Flutter? What I want to do is to run a snippet codes from a string or file, while have ways to interact with object/functions in original dart code.
I understand there's a official flutter library to interpret Lua string (https://github.com/drydart/flutter_lua), however that library could not allow me to bind Dart functions and objects to be used in Lua scripts.