Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why did you choose lua for plugins ? #31

Open
atakanyenel opened this issue Nov 16, 2018 · 1 comment
Open

why did you choose lua for plugins ? #31

atakanyenel opened this issue Nov 16, 2018 · 1 comment

Comments

@atakanyenel
Copy link

Hi,
Why did you choose Lua for the plugin language ? I'm asking this because of a pure engineering interest. Couldn't you use Go again as the official plugin language and download the compiled binaries or does the plugin language needs to be interpreted so that you can embed it in to the program without re-compiling the whole micro binary ?

I currently started looking at Lua , so my other question is , if it has to be an interpreted language , why not any other language but lua ? Is it because you are using C bindings for both languages , or simply you knew Lua ?

Maybe the answer to these questions lies somewhere in the codebase but a nice explanation with your thoughts on the process will be very helpful for me on learning different engineering concepts.

Thanks

@sum01
Copy link
Contributor

sum01 commented Dec 3, 2018

It's very likely because then you don't need compiled plugins and/or recompiling Micro. I know there are ways to have a native language plugin system, but it's probably not as easy to implement vs importing some Lua bindings library.

Not to mention Lua is (apparently) easy to embed in most languages, has a tiny runtime, and is still very fast (being C underneath). I also think it's pretty easy to write & understand, barring it's weird quirks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants