4 ms·
I suppose that's the price for the small core but I do wish Lua had string interpolation. Instead there are like 5 hacky ways to do it: http://lua-users.org/wi
by sireat 4y ago
I suppose that's the price for the small core but I do wish Lua had string interpolation.
Instead there are like 5 hacky ways to do it: http://lua-users.org/wiki/StringInterpolation http://lua-users.org/wiki/StringInterpolation
- VWWHFSfQ 4y agoAs with nearly everything in Lua, if you want bells-and-whistles then you need to find a library. I've been writing a lot of extensions in Rust using mlua [1] which has been fantastic. I've written so much FFI code for Lua it's ridiculous. Rust mlua has been a total game-changer for me. [1] https://github.com/khvzak/mlua https://github.com/khvzak/mlua
- Lyngbakr 4y agomlua looks amazing. Is that the go-to library for Lua bindings in Rust or are there still several options jostling for position?
- VWWHFSfQ 4y agomlua is pretty much the standard for Rust at this point. There are a few others but they're not nearly as comprehensive and they all suffer from various safety issues that require unsafe{}. mlua doesn't require any unsafe usage in its API.
- ColonelPhantom 4y agoI thought rlua was safer than mlua? Am I mistaken there and has the situation perhaps changed, or are you claiming rlua requires you to use unsafe{} in various places?
- xvilka 4y agoI wish there was a Lua implementation in pure Rust (I understand about likely performance degradation compared to LuaJIT). There's incomplete Luster[1], but it's still unusable. [1] https://github.com/kyren/luster https://github.com/kyren/luster