I was presently using this to install rust with a specific version:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=1.78.0 -y
However, I do not want to proceed with this step due to compliance issues of my project. I need help with understanding alternative ways to download an install rust successfully.
Assume, I download the 1.78.0 release tar file, how can I use that to setup rust?
My ultimate goal is to upload the source from where I download rust to artifactory instead of consuming the url directly in my code.
Standalone installers seem to be okay. Assuming I need to setup rust for rhel, ubuntu and windows, what tar.gz I should use for rhel/ubuntu and what msi for windows? And after downloading the tar, how to proceed? I am sorry but I did not clearly understand how to proceed...
Well, when choosing what installer to use, the platform is important. The platform, crudely speaking, consists of your CPU architecture, your OS and what libc you want to bind to. I think the most common platforms for Windows and Linux are x86_64-pc-windows-msvc and x86_64-unknown-linux-gnu, respectively.
Never used the standalone installers before, but there is an install.sh script in the tarball for linux, so executing that might be what you want on Linux. On Windows executing the MSI will open an installation wizard as far as I know.
rust-1.78.0-x86_64-unknown-linux-gnu # rustc --version
-bash: /root/.cargo/bin/rustc: No such file or directory
-Missing something here? Earlier with init script, I used to do this - source $HOME/.cargo/env to add rust to PATH. Something similar to be done after executing install.sh?
Rustc and cargo are installed into /usr/local/bin, not ~/.cargo/bin by default by the install script. This directory should already be in PATH by default, but it may be that you have leftovers from a rustup install for example.
If I use a package manager directly for eg microdnf to install rust, that should work while building cryptograpy right?
I need to understand the difference in contents between rust installation via rustup and rust installation via a package manager for eg dnf install rust.
Using the rustc version from your package manager should work fine provided that the rustc version of your distro is new enough. I assume you are using Fedora based on the mention of dnf. The Fedora version is almost certainly new enough.
The thing is when I use rustup to directly configure rust and then add it to the path, everything works fine but when I use a rhel based package manager to download and install rust, building of cryptography fails.