Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've honestly not found it easy to embed as-is, at least in C++. Getting functions into Lua is a challenge. Sol2 makes life soooo much easier for it.


LuaJIT has FFI capabilities, it's not a one-liner but it's also not bad:

https://gist.github.com/matiasinsaurralde/0a4ecf8f3e0d8768b3...


The problems I've had are passing data structures between...really gets rough.


Getting functions into Lua is my favorite use of macros in c++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: