This project looks amazing. Before I write too many more Lua scripts, I'm considering switching over to using all Rust + Hotpatching.
But! The most important thing is that end users can edit the game scripts without having to install a dev environment.
This is currently working with Luau! Players can jump right into modding instantly just by editing the script files, and embedding or compiling Luau is no problem for all target platforms. This is a pretty big feature for my game.
How could this be possible with Rust? How can I ship an embedded Rust compiler, that works on all platforms?
Possible compromises:
- Get rid of the universal modding system, require user to have rustc installed before they start modding
- Don't allow live modding on Android, iOS, Web
- Ship embedded Rust compiler only for desktop platforms
Other possible solution: Switch to C# for scripting
- Mono runtime can be statically linked and compile to WASM:
- https://godotengine.org/article/live-from-godotcon-boston-web-dotnet-prototype/
- https://github.com/godotengine/godot/issues/70796#issuecomment-2855430724
- Can potentially be compiled to native code in the future with NativeAOT
- https://github.com/dotnet/runtimelab/tree/feature/NativeAOT
- https://github.com/dotnet/runtimelab/tree/feature/NativeAOT-LLVM
- https://github.com/MichalStrehovsky/zerosharp
I'm using Lua because I don't have any other options and I'm basically forced to use it.
I really, really would love to use Rust, but I don't see the path forward. Any ideas?





๐ฅฐ


