evo-lua / evo-runtime

General-purpose Lua programming platform and developer toolkit
https://evo-lua.github.io
Mozilla Public License 2.0
12 stars 1 forks source link

Expose LuaJIT's REPL to the interpreter CLI so that Lua chunks can be evaluated interactively #484

Closed rdw-software closed 9 months ago

rdw-software commented 9 months ago

This can get complicated quickly if hand-rolled from scratch (see luvit's repl), especially with async code.

To keep things simple, should just copy/paste the LuaJIT implementation and expose it to the CLI.

Goals:

Future changes will be needed, but it should be sufficient to just mirror the behavior of the LJ REPL and handle async later.

rdw-software commented 9 months ago

Well, it seems that the quick & dirty way actually works: Copy/paste the source, modify the export signature, call dotty... done.

There's a number of eyebrow-raising things about this so I'll see if I can make the integration cleaner. Also, export to the FFI?