- Rust Programming Cookbook
- Claus Matzinger
- 199字
- 2021-06-24 12:27:40
Managing the Rust installation with rustup.rs
To test whether the installation of the Rust toolchain with rustup was successful, the rustc command is available to run in Terminal (or PowerShell on Windows):
$ rustc --version
rustc 1.33.0 (2aa4c46cf 2019-02-28)
Note that you will have a later version when you are running this. It doesn't matter if you stick to the 2018 edition for your code.
Rust requires a native linker to be available on your system. On Linux or Unix systems (such as macOS), Rust calls cc for linking, whereas on Windows, the linker of choice is Microsoft Visual Studio's linker, which depends on having Microsoft Visual C++ Build Tools installed. While it's possible to use an open source toolchain on Windows as well, this exercise is left for more advanced users.
Even with the 2018 edition, some useful features are still only available on nightly. To install the nightly edition of rustc, perform these steps:
- Run rustup install nightly (use nightly-msvc on Windows if you are not using the GNU toolchain) in a Terminal or PowerShell window.
- After the command finishes, the default toolchain (used in cargo) can be switched using rustup default nightly.
推薦閱讀
- 手機(jī)安全和可信應(yīng)用開發(fā)指南:TrustZone與OP-TEE技術(shù)詳解
- Learning NServiceBus(Second Edition)
- Python入門很簡(jiǎn)單
- PHP 7底層設(shè)計(jì)與源碼實(shí)現(xiàn)
- Java Web開發(fā)之道
- JMeter 性能測(cè)試實(shí)戰(zhàn)(第2版)
- PHP 編程從入門到實(shí)踐
- Elasticsearch for Hadoop
- 全棧自動(dòng)化測(cè)試實(shí)戰(zhàn):基于TestNG、HttpClient、Selenium和Appium
- Learning Unity 2D Game Development by Example
- Instant GLEW
- Learning Cocos2d-JS Game Development
- 創(chuàng)新工場(chǎng)講AI課:從知識(shí)到實(shí)踐
- The Applied Data Science Workshop
- 前端Serverless:面向全棧的無服務(wù)器架構(gòu)實(shí)戰(zhàn)