mlua
mlua copied to clipboard
iOS support
I'm currently making a little cross-platform game as a side project where I want to use Lua but realized that unfortunately mlua doesn't support iOS yet. Did some digging myself and managed to get it working but it's very hacky. If someone knows how to actually package this properly into a PR and get iOS support in mlua I would extremely appreciate it! 😊
What I did
(all of this is concerning the lua-src crate, not the mlua crate itself)
- Added iOS as a valid build target by "cheating"
_ if target.contains("apple-ios") => {}- This should also preferably contain tvOS and potentially watchOS although you would have to be quite crazy to want to run Rust + Lua on your smartwatch 😆
- Disabled system in
luaconf.husing what I found here: http://lua-users.org/lists/lua-l/2017-09/msg00242.html- See I said this was quite hacky 😅 This solution works, but I can't for my life imagine that the actual Lua source would have to be modified for iOS to work properly. Most likely, there is something we can configure in the build script to get this going properly, I just don't personally know what.
Thanks! I'll take a look and definitely consider adding iOS support.
Seems Luau is the best option to use in iOS