It's not necessary for Rust, no.
This is only a problem for Python because of a design flaw, one which Rust did not copy.
It's not necessary for Rust, no.
This is only a problem for Python because of a design flaw, one which Rust did not copy.
Rust is very different to Python and Cargo is very different to apt.
When you build your rust/Cargo project it compiles all the dependencies specified in Cargo.toml into a single executable.
That executable (with some exceptions) can then be run without any dependencies. You don't even need Rust or cargo installed. Therefore the Rust running in the kernel is entirely isolated from whatever your Rust app is doing.
There's no need for virtual environments etc
Every rust project is basically it's own venv out of the box.
Kind of but it is also only needed at compile time, the dependencies are not used at runtime, instead everything is compiled and statically linked into the executable.
You don't need to worry about that in rust. Cargo is built from the ground up to understand package versions and downloads/builds the right versions for each project. The global package caches understand versions and can cache multiple versions of each package. Where as python just uses one or more global stores of packages shared by all projects. venv
is basically there to isolated these package stores along with the version of python which can have breaking changes between different releases (this is something rust avoids at all costs so you can upgrade it without worrying as much as with python).
My god this is so fucking clever and so fucking good to hear!!