Closed ShalokShalom closed 1 year ago
Personally, I don't think that Fyrox should support multiple languages like Godot does. Right now, the engine and editor are pretty hackable already as is and from what I've seen I am pretty sure that a single build.rs
file (or proc macro), together with Rust's ability to implement traits for types from other crates already allow people to implement their own languages for Fyrox.
They just need some wrapper to make types used in fyrox shareable with their scripting language of choice and a proc macro/build.rs file that at build time generates the types needed on Fyrox's end that corresponds to the types written the scripting language.
I also think that we can do better than embedding mono and that F# as a scripting language doesn't make much sense for Rust projects in general but those are entirely different discussions.
I do think, having F# as an alternative is quite a different thing to be able to implement own languages.
I want to start with the language I already know, and not implement another language, that might not come with the same editor support, etc than F#.
I take your advice at heart, though, that F# is not suitable as a scripting language for Rust projects.
I generally think, that one of the best approaches to implement scripting in general, is to use wasm.
I found this: https://www.reddit.com/r/rust/comments/y6k9g9/wrapped_mono_02_run_cf_code_inside_your_rust/
It allows to embed F# into Rust projects.
Considering F# supports many Rust features, and is more usable as a scripting language due it being more concise thanks to global type inference, and a different focus overall.
So I do see, that fsharp can become embedded into Fyrox.
Would you evaluate this?