bevy_mod_scripting icon indicating copy to clipboard operation
bevy_mod_scripting copied to clipboard

C# Support

Open Shadowblitz16 opened this issue 1 year ago • 3 comments

How viable would a trimmed down version of C# be? Could it even be made to work with rust's safety features?

Shadowblitz16 avatar Dec 02 '24 05:12 Shadowblitz16

I think it would be more difficult as we'd need to build the ffi bindings ourselves, as far as I can see there's no mlua equivalent for C# yet

makspll avatar Dec 04 '24 21:12 makspll

@makspll how does mlua have to do with C#? I mean using a trimmed down version of C# for a scripting language in bevy. There is also ZeroSharp but that means writing your own core lib.

Shadowblitz16 avatar Dec 09 '24 03:12 Shadowblitz16

Some linkage that could be helpful

FFI bindings: https://crates.io/crates/csbindgen https://crates.io/crates/interoptopus

WASM target: https://godotengine.org/article/live-from-godotcon-boston-web-dotnet-prototype/ godotengine/godot/issues/70796#issuecomment-2855430724

NativeAOT target: https://github.com/dotnet/runtimelab/tree/feature/NativeAOT https://github.com/dotnet/designs/blob/main/accepted/2020/form-factors.md#native-aot-form-factors https://github.com/MichalStrehovsky/zerosharp

Unity's IL2CPP: https://unity.com/blog/engine-platform/an-introduction-to-ilcpp-internals https://docs.unity.cn/cn/tuanjiemanual/Manual/WeixinMiniGameDotNetSupport.html https://developer.unity.cn/projects/65c06396edbc2af9547b9b7f

Yzrsah avatar May 27 '25 03:05 Yzrsah