4 ms·
Iterative compile times are definitely a constant consideration for us. Some various thoughts on this topic: * For faster iteration on game logic, you can comp
by _cart 5y ago
Iterative compile times are definitely a constant consideration for us. Some various thoughts on this topic:
* For faster iteration on game logic, you can compile app logic in debug mode and the engine in release mode. App logic is rarely the bottleneck when compared to internal systems like rendering.
* Dynamic linking has been a huuuuge win for us. Dynamically linking often gives sub-second iteration times for our examples. Of course, as your app logic/crates get bigger it is more important for you to manage compile time complexity on your end (and we have seen bigger projects notice this trend). Developers can control this by modularizing their code (and dynamically linking these modules when necessary). I'd like to build templates and tooling that encourages people to follow these patterns.
* We have an optional "fast compiles" configuration (check out our quick start guide), which gives additional significant compile time boosts (ex: faster linkers, generic sharing, etc).
* Dynamic linking is just one piece of the puzzle. We need to constantly drive down code size and complexity (by limiting things like generic usage) and dependencies to ensure that userspace compiles as quickly as possible, with or without dynamic linking. Macroquad is the pinnacle of this minimization in the rust ecosystem (imo), but they make way more compromises in terms of "rust ecosystem usage" and api design than I am willing to. My goal is to strike an ideal balance between these (often conflicting) goals.