News for hackers. Stuff that matters.
Re:Why Lua Beats MicroPython for Serious Embedded Devs by UncleEntity on Sunday July 13, 2025 @12:54PM (#44551733)
I've yet to find an even decent python binding generator, TBH.

Generally, I use pybindgen to get the basic module and then hack on that by hand. The main problem is most C(++) libraries aren't designed to interoperate with managed memory languages so most of the work is figuring that out. Don't get me wrong, I've tried to work within the binding library (with pybindgen at least) but the amount of work for anything even slightly complicated isn't really worth it.

For a project with a major python API (like blender) you're better off crafting your own python class generator (again, like blended does, and even that has some major issues around object lifetime management). Best would be to design the underlying library/application with python integration in mind but that's not always possible if you want to include other libraries.

I can say I did mess around with using lua as an embedded scripting language within an application years ago and it wasn't too difficult from what I remember. It was only ever a proof-of-concept and didn't go too far so I never ran into the inevitable edge case as one always does with these sorts of things.

Re:Why Lua Beats MicroPython for Serious Embedded Devs by miguel_martin on Sunday July 13, 2025 @02:23PM (#44552354)
See pybind11 or nanobind
Re:Why Lua Beats MicroPython for Serious Embedded Devs by triknomeister on Sunday July 13, 2025 @12:56PM (#44551754)
That's very true actually. Boost.Python is not good, but the alternative then is actually doing everything ourselves which seems worse in short term.