Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to install the Rust environment for MAC

Shulou Source: shulou.com Published: 2022-06-02 04:58:48 10月05日 Update

This article mainly explains "how to install the Rust environment in MAC". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install the Rust environment with MAC.

Rust is a system programming language that focuses on security, especially concurrency security, and supports functional, imperative and generic programming paradigms. Rust is syntactically similar to C++, but the designers want to provide better memory security while ensuring performance. Rust was originally designed and created by Graydon Hoare of the Mozilla Research Institute, and then gradually perfected with the contributions of Dave Herman, Brendan Eich and many others. The designers of Rust optimized the Rust language and Rust compiler through their experience in developing the Servo website browser layout engine.

The Rust compiler is free and open source software under the dual agreement declaration of MIT License and Apache License 2.0. Rust has been crowned the "favorite programming language" project surveyed by Stack Overflow developers for the fourth year in a row (2016, 2017, 2018, 2019).

-- from Baidu Encyclopedia

1. Installation

Curl https://sh.rustup.rs-sSf | sh

There are all kinds of errors in using brew, which are still slow.

2 compile source $HOME/.cargo/env

3. View rustc-- version in version

4. View cargo-- version for installation package version

5. The first example

Named hello.rs

Fn main () {

Println! ("Hello World!")

}

6. Compile the code rustc hello.rs

7. Run the executable file. / hello

At this point, I believe you have a deeper understanding of "how to install the Rust environment in MAC". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Language compilation environment security programming design content version programming language compiler website paradigm designer learning practical deeper code examples interests memory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL Microsoft Docker Shulou Information