komerdoor / nim-embedded-nimscript

Example of how to embed Nimscript in your Nim application
BSD 3-Clause "New" or "Revised" License
18 stars 2 forks source link

More complex examples of builtins #1

Closed andreaferretti closed 6 years ago

andreaferretti commented 7 years ago

Any idea how to create a builtin that also takes arguments? Or how to expose a compiled function (do we need to go through scriptRegister a function of the samename and signature?)

komerdoor commented 7 years ago

I did some work on that, but never committed it. Will do it soon.

h0lley commented 7 years ago

I'd be interested in that, too.

I haven't been able to find any other repo showcasing the implementation of nimscript as embedded scripting language, and few are willing or able reverse engineer the nim compiler source to figure all this out.

edit: For anyone ending up here in the hopes of managing to implement embedded nimscript, I've got you covered: https://github.com/Serenitor/embeddedNimScript This also lets you call procs with arguments and return values both ways.

komerdoor commented 6 years ago

@Serenitor Cool. Had no time to finish this myself. Thanks for helping everyone out.

Can I add a link to your project in the Readme?

h0lley commented 6 years ago

sure. I might update it soon.