4 ms·
In the videogames world we - need very good performance - don't care about memory safety (not an issue) - also need fast compile time
by stephc_int13 6y ago
In the videogames world we
- need very good performance
- don't care about memory safety (not an issue)
- also need fast compile time
- est31 6y agoIt has improved a little a while ago with the stable profile overrides feature, allowing you to compile dependencies in release mode and your own logic in debug mode. Made work on my Rust written game much easier. But there's still ways to go. Ideally you have an engine and lua/scripting layer anyways.
- dmm 6y agoI don't know how I missed this but you really made my day! Serde is much slower in debug builds so I have been using release for everything. That works but the builds take a looong time.
- mitchtbaum 6y ago> Ideally you have an engine and lua/scripting layer anyways. Honk
- muldvarp 6y ago> In the videogames world we [...] don't care about memory safety (not an issue) Well, that's how you get remote code execution vulnerabilities in CS:GO [1]. If you're doing anything at all over the network you absolutely need to care about memory safety. This doesn't mean that you need to use Rust of course, but security is still an issue. [1] https://hackerone.com/reports/351014 https://hackerone.com/reports/351014
- jay_kyburz 6y agoWhy don't we care about memory safety? We care about memory safety as much as any program. Engine code doesn't need fast compile times, scripts do, but they are scripts.
- jstimpfle 6y agowhy doesn't engine code need fast compile times?
- jay_kyburz 6y agoWell, everybody likes fast compile times, I was just thinking they don't need to be faster than any other code. Where I have worked, we have used scripting for fast iteration. To clarify: We have fast scripts when you want to iterate, so don't need fast engine compile times.
- jstimpfle 6y agoWhat about the developers of the engine? I sure would want fast compile times.
- sanderjd 6y agoI see this claim a lot, but I don't remember the last time I played a game with no network access. If you're capable of opening ports to the mad world of the internet, I think memory safety is relevant. But I'd love to be educated on why this is wrong.
- Polylactic_acid 6y agoIt is true that game devs don't care about it though. Thats why we constantly see RCEs over games.
- silverdrake11 6y agoYou should care about memory safety in any language. The point is to reduce bugs and have more maintainable code, that doesn't introduce memory errors when something is changed. Or when making something concurrent. Now of course if you use a garbage collected language, then you aren't in control of memory, so it's less of an issue. But if you are using C++ for high performance applications such as gaming, then you are in control of it and need memory safety.