Is there a way to make the size of whole project files smaller?

Disabling debug info helps a lot. With build overrides you can disable it only for dependencies.

[profile.dev]
debug = 1

[profile.dev.package."*"]
debug = false

You can apply same to release profile, and also set incremental = false.

Also check

cargo tree -d

to see if you have duplicate dependencies.

Delete the target dir after you make these changes, because the previous bloated files stay anyway.

1 Like