Open zhiqiangxu opened 1 year ago
Yeah with incremental compilation enabled it can get really big really fast. I'm not sure why Lighthouse would be larger than other projects you're working on, but we do have a lot of dependencies (around 1300). Our use of monomorphization for different EthSpec
types also blows up the amount of code generated.
Usually I just run cargo clean
periodically. You can always run it when updating Rust, because the old artefacts won't work with the new compiler anyway.
You could also try disabling incremental compilation with CARGO_INCREMENTAL=0
, but this will make the build time a lot longer.
Thanks for the tips, I've been using rustc 1.67.0-nightly (ff8c8dfbe 2022-11-22)
for a while, and here're some other project sizes for comparison:
9.1G /Users/xxx/Desktop/github/snarkOS
12G /Users/xxx/Desktop/github/snarkVM
5.5G /Users/xxx/Desktop/github/rust-fil-proofs
1.1G /Users/xxx/Desktop/github/halo2
2.9G /Users/xxx/Desktop/github/zkWasm
1.9G /Users/xxx/Desktop/github/Nova
1.2G /Users/xxx/Desktop/github/leo
10G /Users/xxx/Desktop/github/builtin-actors
@zhiqiangxu Any progress on this? Did disabling incremental compilation help at all? Funnily enough, I was perusing my own Rust build directories (for Lighthouse and otherwise) and realised just how large they can get.
Didn't try yet, as compilation is automatically triggered by IDE, vscode in my case.
Yesterday I run out of space and at last I found:
I'm also building many other rust projects, this is the largest I've seen so far...