The Rust language itself ain’t tailored really for any kind of specific domain, it’s a system language. However, it had to start somewhere, and it’s Mozilla who makes Rust, so since they are already in the web field, they started there by rewriting internals for the Fire Fox browser in Rust. Some ditched their old languages and rewrote in Rust to gain massive performance boosts and smaller memory foot prints.
And regarding performance, it’s only safe rust that may be slower than C++. You can write anytime anywhere inside safe Rust code so called unsafe blocks/functions for performance critical parts if needed. It’s very hard to pin point the performance loss. it really depends on the performance intensive code, but the worst number I saw was 15% in safe Rust.
A small price to pay for a clean, maintainable, and very stable code base that allows the programmers to be productive. Time is money these days more than ever. That’s the edge you get with Rust over C++ as Rust gives move than just the language itself. It’s the Cargo/Crate system, the documentation, and code formatting system. It’s this kind of consistency, wholeness, that make companies eventually choose Rust in addition to it safe and clean code. Plus, plus(see what I did here?), it’s simpler to teach to new employees.
Oh, and 15% compared to a 100FPS C++ code, doesn’t translate to 15FPS loss in Rust. It’s less than 15FPS. Hence a small price to pay. And safe Rust is always faster than managed code C#/F# in general.
Yeah, I know, it depends on your project. But, yeah, managed code has come a long way and got a ton of performance improvements. There are C# written game engines, Space Engineer is one of them, it’s not that bad. But heck, I got a Ryzen 7 3700x 16 threads, and the GC hiccups are just there. Only Unity games can get away with it, because it’s only the game logic that is written in C#, and Unity/UE games tend to be simple. Seems Cities Skyline had to use native code even with Unity.
Anyways, Rust isn’t meant to compete with C/C++, it is mean to replace it. However, it can compete with C# in my opinion. C#, or any managed code in general, looses FPS even with the boundary transition between managed/native alone. Epic Games pointed that out, and they are not happy about that. It’s sub optimal obviously. Yet, Rust is to my opinion only half a notch “harder” than C#. Yet virtually comes with the performance of C/C++.
MS made C#, and it’s part of VS, Eventually MS will add Rust to VS, too. That’s the perfect ground for competing. MS is already working Rust/WinRT just like it does on C#/WinRT. Except, Rust is still not Dot Net based, which may be off putting to some, but in general that’s better because even with cross platform .Net you got the closed platform smell of MS all over it. Unlike with Rust that is cross platform just like C/C++ and many of its APIs.
For game logic only, it’s more like learning Rust and C#, not C++. If UE supported Rust it still would support C++ of course. And Unity devs absolutely wouldn’t care about learning C++.
With game logic you actually can get away with not learning C/C++ much easier these days, than with say, trying to make a game engine.
Trying to make the UE community except Rust is a notch likelier than Unity devs. Because Unity already got C#. Yes, many actually want F# because C# is messy to work with, but anyways…
It depends on the type of engine, but for 3D it’s not pretty. Rust will suffer like Linux if MS doesn’t help out with APIs. But Rust/WinRT is on the way and is made by MS itself.
Don’t hold your breath on that present moment fact. There are translation tools already for some languages. There could be a translator in the future for Rust. This may largely erase C/C++'s ability to hide behind its established domain any longer to maker infinite excuses for being crap as a language itself.
I prefer Rust over C/C++ obviously. But I wouldn’t want to be a Rust language dev. I’m constantly wondering why Rust lang devs even really try. Because although C/C++ may evolve very slowly, at some point when Rust hunts it down, and it does already, and then C/C++ would evolve faster trying to defend its domain. And it does. So, maybe it’s those translators that is Mozilla’s Atomic Breath to beat Cong++.
Adding Rust now, can start a transition to an UE version that is fully written in Rust by letting dev learning and getting used to it now.