The first step in using rust is of course to install it. There are many ways to install rust, but the simplest way is to use the rustup script. If you’re using Linux or Mac, that’s all you need to do (note that you don’t need to enter $, they only show the beginning of each command):
$ curl -sf -L https://static.rust-lang.org/rustup.sh | sh
If you are worried about the potential insecurity of using curl | sh, please continue to read our disclaimer. You can also freely choose to use the two-step installation version – script for installation and inspection:
$ curl -f -L https://static.rust-lang.org/rustup.sh -O $ sh rustup.sh
If you are using windows, please download the appropriate version of the installer.
If you decide not to use rust again, we’ll be a little sad, but it doesn’t matter. Not every programming language is suitable for everyone. Run the following uninstall script:
$ sudo /usr/local/lib/rustlib/uninstall.sh
If you are using Windows Installer, rerun the. MSI file and it will show you an uninstall option.
When we tell you to use curl | sh, some people will feel very uncomfortable, which is natural to some extent. Basically, when you do this, you believe that the people who maintain rust are good people, and they won’t attack your computer or do bad things. This is a good instinct! If you are one of these people, please check the documentation to build rust from source code, or download it officially
We should also mention officially supported platforms:
Windows (7, 8, Server 2008 R2)
Linux (2.6.18 or later, various distributions), x86 and x86-64
OSX 10.7 (Lion) or greater, x86 and x86-64
We have conducted a lot of tests on rust on these platforms. Like other platforms, such as Android, we have also done some tests, but we recommend using the above platforms because they have the most tests.
Finally, a description of windows. Rust believes that windows is a first-class publishing platform, but we honestly say that the experience of windows is not as integrated as that of Linux / OS X. We are trying to improve it! If there is something that makes rust unable to work, it is a mistake. If this really happens, please let us know. Every error submission will be tested on windows like any other platform.
If you have installed rust, you can open a shell and enter the following command:
$ rustc --version
You will see the version number, submission hash and submission date. If you only install version 1.0.0, you will see:
rustc 1.0.0 (a59de37e9 2015-05-13)
If the display is as shown above, it indicates that rust has been successfully installed! congratulations!
The installer will also install a copy of the documentation locally so that you can read it offline. On UNIX systems, / usr / local / share / Doc / trust is the installation location. On windows, it is in a share / doc directory, no matter where you install rust.
If not as shown above, there are many places you can get help. The simplest is the # rust IRC channel at irc.mozilla.org, which you can access through mibbit. Click the hyperlink and you can chat with other rustaceans (the nickname we use to call ourselves Mengmeng). We can help you. Other useful resources include user forums and stack overflow.
Hosting address:Rust Chinese