3 ms·
How does this interoperate with the Rust program it's embedded in? Is making functions or values available to it as tedious and verbose as in Lua? Or is there s
by sdegutis 10y ago
How does this interoperate with the Rust program it's embedded in? Is making functions or values available to it as tedious and verbose as in Lua? Or is there some way of calling Rust functions or accessing Rust values automatically from inside embed_lang neé Gluon? I'm assuming it's just as tedious as in Lua, since otherwise it would need powerful runtime reflection, which seems like a feature that Rust wouldn't really have or want.
- sitkack 10y agoLua has one of the cleanest no_magic c-apis of any scripting language. LuaJIT has the cleanest with_magic c-apis of any scripting language. So clean that it has been copied by PyPy [0], Guile [1] and others. [0] http://www.freelists.org/post/luajit/LuaJIT-FFI-Python-CFFI http://www.freelists.org/post/luajit/LuaJIT-FFI-Python-CFFI [1] https://www.gnu.org/software/guile/manual/html_node/Dynamic-FFI.html https://www.gnu.org/software/guile/manual/html_node/Dynamic-... And yes, Gluon appears have to an extremely low friction interface to Rust. See my comment above.
- steveklabnik 10y agoAs linked above, https://github.com/Marwes/gluon/blob/master/TUTORIAL.md#embedding-api https://github.com/Marwes/gluon/blob/master/TUTORIAL.md#embe...