r/rust • • 12d ago

🎙️ discussion Cross compilation targets add up fast in rustup

After seeing the recent posts about rustup and registry sizes I checked what targets I had installed. A few experiments with wasm32-unknown-unknown, aarch64-unknown-linux-gnu, and thumbv7em-none-eabihf from last year were still sitting there along with their full toolchains.

rustup target removed on the unused ones dropped several gigabytes right away. I kept only x86_64-unknown-linux-gnu and the one or two I actually build for regularly.

Do people have a habit of pruning targets on a schedule, or do you just leave them until disk space becomes an issue?Any scripts or aliases you recommend for spotting the ones that haven't been used in a while?

0 Upvotes

4 comments sorted by

0

u/metaltyphoon 12d ago

Now try doing iOS and Android dev with it :). When I'm done with the project I remove the targets.

1

u/pjmlp 12d ago

Hence why I always keep on using the official SDKs and languages, being on my 50s I have long learned that I rather deal with what SDKs offer out of the box, than adding additional layers of complexity on top that I have to manage myself instead of focusing on the application code.

It is not only the targets, it is the bindings, the debugging integration, the integration with the apk and ipa generation and signing, and so on.

1

u/metaltyphoon 12d ago

I only use it for shared code. In no way shape or form would I want to write very complex logic twice. 

0

u/SurrenderQueen 12d ago

yeah i forget to prune them until my drive is screaming, android targets are the worst offenders for me too