Is it normal that the project takes up 4 GB of space?

Hello!
I create project with bevy and it weighs 4GB, is this ok on Rust or it just bevy so huge ?
And when that's normal, how can I install a library globally?

*laughs in rust-lang/rust repo checkout (+ build)* mine’s 48GB at the moment

I never used bevy, so I can’t comment on that particular case, but it doesn’t seem completely unreasonable. Installing libraries globally is not really a thing for Rust. There’s some tools to reduce build times (by caching the results, e.g. sccache), but they won’t help with size either. On the contrary, the additional central cache would rather increase overall space requirements.

2 Likes

cargo build --example breakout --all-features on bevy main (Make change lifespan deterministic and update docs (#3956) · bevyengine/bevy@fca1c86 · GitHub) has 331 crates to compile. With rustc 1.60.0 it takes 4.2GB. cargo build --example breakout has 272 crates to compile. It takes 3.5GB.

Building bevy needs so much space because it needs to compile an entire shader compiler (naga), a webgpu implementation that can target multiple graphics api's (wgpu), a windowing library (winit), parsers for various asset formats like png and jpg images, gltf 3d models, ttf fonts and a bunch of other things.

7 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.