#Very New to Rust Ecosystem (Coming from C#/Python)

16 messages · Page 1 of 1 (latest)

dawn remnant
#

I'm following this guide.

It asks me to do the following:
cargo install --force cargo-stylus
rustup default 1.81
rustup target add wasm32-unknown-unknown --toolchain 1.81

Seems to be global?

From my (debug) experience with python and nuget packages, this type of static setting usually leads to footguns down the road.

I've had things break and I forget why or how to track them down because I followed a tutorial forever ago

So my question is, is this a good way to set my toolchain defaults? Alternatively, how could I do this better?

finite agate
dawn remnant
remote mural
#

in python, when you say pip install, you are installing a package into the python environment of packages

#

this ends up persistent state sharing space with your dependencies, which is why venvs are used to isolate dependency lists from each other

#

in Rust, dependencies are local to a project and there is no environment they are installed in, building just builds with them without needing to worry about other things

dawn remnant
# remote mural in Rust, dependencies are local to a project and there is no environment they ar...

I asked GPT as well and it seems it's also a size/heaviness issue between rust and python toolchains

interesting

The key issue I see is that directories will probably change between my PCs so I'd need to manually re-set every rustup override per repo path every time I swap between PCs

Is there some way to map these programmatically? Or would I need to actively setup my directories between PCs identically lol

remote mural
remote mural
#

for toolchains, there is a list of components and targets installed per toolchain. this is purely additive, keeping them out is only for storage space reasons.

#

they can be specified in rust-toolchain.toml, but they can also just be installed when you need them - unlike python, they will never need to be uninstalled or updated

#

meanwhile, cargo install is an expedited version of git clone + cargo build --release + install ... ~/.cargo/bin

#

rarely do such tools have problems where you need an old version, but it's an uncomplicated build and you can perform it manually whenever needed

finite agate
finite agate