Is there a way to bind dart to lua?

636

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.

Share:
636
hythloday
Author by

hythloday

Updated on December 15, 2022

Comments

  • hythloday
    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.