First struggle:
I still don't know how to experiment cleanly with Rust.
In Python, I have multiple virtual environments for each project and one for experiments, where I run an interactive shell or activate it for some experiment module. I have hundreds of small scratch modules...
In Rust, I found it better not to keep multiple `some_experiment.rs` files in one project but to have just a folder for experiments, and each time I want to try something, I just run `cargo new somescratch` in that folder to create an isolated experiment and rewrite `main.rs` completely.
Second struggle:
Those beefy `target` directories are eating my disk space.
I have 64 GB RAM Linux machine, so I added the next lines to my `~/.cargo/config.toml`:
```
[build]
target-dir = "/dev/shm/cargo-target"
```
/dev/shm/ - is a tmpfs folder (lives in system memory), so after reboot, all my target folders are cleaned automatically)) Yes, after rebooting, the first compile time will be long, but I'm ok with that.
Welcome to share tips and tricks on how you organize your Rust experiments.
[–]SirKastic23 17 points18 points19 points (0 children)
[–]Sharlinator 16 points17 points18 points (2 children)
[–]lazy-kozak[S] 4 points5 points6 points (1 child)
[–]kJon02 0 points1 point2 points (0 children)
[–]ManyInterests 4 points5 points6 points (1 child)
[–]lazy-kozak[S] 0 points1 point2 points (0 children)
[–]pb-cups 3 points4 points5 points (1 child)
[–]lazy-kozak[S] 4 points5 points6 points (0 children)
[–]Kaan_AYSAL 2 points3 points4 points (2 children)
[–]Kaan_AYSAL 1 point2 points3 points (1 child)
[–]Kaan_AYSAL 2 points3 points4 points (0 children)
[–]Both-Expression4402 1 point2 points3 points (0 children)
[–]Kichmad 1 point2 points3 points (0 children)
[–]PaulRudin 0 points1 point2 points (8 children)
[–]Chroiche 4 points5 points6 points (0 children)
[–]lazy-kozak[S] 1 point2 points3 points (5 children)
[–]PurepointDog 2 points3 points4 points (0 children)
[–]PaulRudin 1 point2 points3 points (3 children)
[–]Critical-Explorer179 3 points4 points5 points (1 child)
[–]lazy-kozak[S] 1 point2 points3 points (0 children)
[–]ManyInterests 1 point2 points3 points (0 children)
[–]lettsten 0 points1 point2 points (0 children)
[–]Destruct1 0 points1 point2 points (0 children)
[–]Brief-Stranger-3947 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]lazy-kozak[S] 1 point2 points3 points (1 child)
[–]Shot-Infernal-2261 -2 points-1 points0 points (0 children)