4 ms·
Rust faster compile time? Faster than what? The terrible compile time is a big reason why I avoid rust for game dev.
by sarchertech 4y ago
Rust faster compile time? Faster than what? The terrible compile time is a big reason why I avoid rust for game dev.
- vvanders 4y agoLast game engine(C++) I worked on was a full hour to build if you touched a core header, and that was with Incredibuild that farmed out the compile across the studio. If you care about compile/iteration times you can get them down to a reasonable level, Bevy does a good job splitting the heavy lift part into a section that is linked dynamically[1] which leads to pretty reasonable compile times even in something Rust based. That said most of the high-churn areas I've seen drop to some scripting language(ex: Lua or others) for both hot-reload and avoiding compile times. Usually the heavy compute pieces are out in native with orchestration in scripting or something more flexible. [1] https://bevyengine.org/learn/book/getting-started/setup/#enable-fast-compiles-optional https://bevyengine.org/learn/book/getting-started/setup/#ena...
- pjmlp 4y agoThat is why we now have incremental linking, hot-code reloading and for the lucky ones on VC++, modules. This toy application https://github.com/pjmlp/gwc-rs https://github.com/pjmlp/gwc-rs takes about 15 minutes to compile from scratch on a humble Asus 1215B, whereas the C++ original (thanks to having Gtkmm available as binary), takes about 2 minutes.
- echelon 4y ago> The terrible compile time is a big reason why I avoid rust for game dev. Compile times are the least of your worry. The big problem is lack of tools and libraries in Rust gamedev. You can't even achieve PS2-era graphics with Rust right now. Neither Bevy nor FyRox support blend shapes / morph targets, and that's a two decades old and absolutely essential animation tool. Rust for gamedev is going to take a decade to really get going.
- shmerl 4y ago> You can't even achieve PS2-era graphics with Rust right now. Don't you have access to Vulkan from Rust? So you should be able to do whatever you want, same as doing it in any other language I assume that can plug into it.
- habitue 4y agoI think the point being made is about the tooling being available to do it easily.
- shmerl 4y agoHaven't looked into it, but I think there were a bunch of projects for Vulkan bindings for Rust. Not sure how much harder it's to use that vs using it from C++.
- habitue 4y agoSo ambient uses WebGPU, which on rust usually means the wgpu library, which has a vulkan backend for platforms that support vulkan. It's possible that's what you're thinking of. The issue is that vulkan is really low level. So while it's possible to do whatever you want, you need tooling to make it worth the effort to do in rust. For example, let's say this morph thing is a click and drag difficulty level operation in Unreal engine, but in ambient there's no specific tool for it so you have to write 10K lines of code to do the same thing. In this case, the issue isn't what's possible through the gpu, but rather how much work a developer has to do. If you have to choose between writing big portions of code to do what other engines nice you for free vs. spending that time on your game, many developers will opt for the more mature engine. (I say this as someone who is not a game developer, I've never used Unreal engine, and I have no idea what this morph operation is, but this is the shape of the issue at play here)
- shmerl 4y agoThis sounds to me like an engine issue, it has nothing to do with it being in Rust. Same can apply to engine in any language. I.e. whether it provides certain features for you or not and you need to implement them yourself.