Closed geekrelief closed 3 years ago
This might be useful https://github.com/beef331/nimscripter
After studying nimscript, trying out nimscripter, studying dsrw/enu, I don't think integrating nimscript is worth the cost of implementation. At the minimum bindings are needed between the nimscript and godot-nim. If you're going to interact with Godot callbacks, then you need to do something like what enu is doing checking the state of the script/VM. Each instance that runs a nimscript needs to instance an interpreter. I already get 2-3 seconds compile times, so iterating with hot reloading is pretty quick. Hopefully, the {.pure.}
bug is fixed in the compiler, and IC will reduce the iteration time even further.
https://github.com/dsrw/enu uses the nim interpreter to implement a DSL. It creates an interpreter per script. Not sure how performant this is, but it could be useful for quickly testing out ideas.
how to embed nimscript: https://peterme.net/how-to-embed-nimscript-into-a-nim-program-embedding-nimscript-pt-2.html