In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install the rose language in the Linux system, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
The Rust speed is amazing and the memory utilization is extremely high. Without runtime and garbage collection, it is competent for performance-demanding services, can run on embedded devices, and can easily integrate with other languages.
Introduction to Rust language: Rust language is an efficient and reliable general high-level language.
Its efficiency is not limited to development efficiency, its execution efficiency is also commendable, and it is a rare language that takes into account both development efficiency and execution efficiency.
The Rust language was developed by Mozilla and was first released in September 2014.
Rust's compiler is free and open source software under the dual agreement declaration of MIT License and Apache License 2.0.
Install Rust language in Linux specific steps: we can install Rust in a variety of ways, but the following is the official recommended installation method.
$curl https://sh.rustup.rs-sSf | sh info: downloading installer Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at: / home/daygeek/.cargo/bin This path will then be added to your PATH environment variable by modifying the profile files located at: / home/daygeek/.profile / home/daygeek/.bash_profile You can uninstall at any time with rustup self uninstall and these changes will be reverted. Current installation options: default host triple: x86_64-unknown-linux-gnu default toolchain: stable modify PATH variable: yes 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation > 1 info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' info: latest update on 2018-12-06 Rust version 1.31.0 (abe02cefd 2018-12-04) info: downloading component 'rustc' 77.7 MiB/ 77.7 MiB (100%) 1.2 MiB/s ETA: 0s info: downloading component 'rust-std' 54.2 MiB/ 54.2 MiB (100%) 1.2 MiB/s ETA: 0s info: downloading component' cargo' 4.7 MiB/ 4.7 MiB ( 100%) 1.2 MiB/s ETA: 0 s info: downloading component 'rust-docs' 8.5 MiB/ 8.5 MiB (100%) 1.2 MiB/s ETA: 0 s info: installing component' rustc' info: installing component 'rust-std' info: installing component' cargo' info: installing component 'rust-docs' info: default toolchain set to' stable' stable installed-rustc 1.31.0 ( Abe02cefd 2018-12-04) Rust is installed now. Great! To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH environment variable. Next time you log in this will be done automatically. To configure your current shell run source $HOME/.cargo/env run the following command to configure the current shell.
$source $HOME/.cargo/env run the following command to verify the installed version of Rust.
$rustc-- version rustc 1.31.0 (abe02cefd 2018-12-04) how to test the Rust programming language? After installing Rust, follow these steps to check that the Rust language is working properly.
$mkdir ~ / projects $cd ~ / projects $mkdir hello_world $cd hello_world create a file and add the following code and save it. Make sure that the Rust file always ends with the .rs extension.
$vi 2g.rs fn main () {println! ("Hello, It's 2DayGeek.com-Best Linux Practical Blog!");} run the following command to compile the rust code.
The command above $rustc 2g.rs will create an executable Rust program in the same directory.
$ls-lh total 3.9m-rwxr-xr-x 1 daygeek daygeek 3.9m Dec 14 11:09 2g-rw-r--r-- 1 daygeek daygeek 86 Dec 14 11:09 2g.rs runs the Rust executable file to get output.
$. / 2g Hello, It's 2DayGeek.com-Best Linux Practical Blog! Okay! It's working properly.
Update Rust to the latest version.
$rustup update info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' info: checking for self-updates stable-x86_64-unknown-linux-gnu unchanged-rustc 1.31.0 (abe02cefd 2018-12-04) run the following command to remove the Rust package from the system.
After rustup self uninstall uninstalls the Rust package, delete the Rust project directory.
$rm-fr ~ / projects Thank you for reading this article carefully. I hope the article "how to install the Ruth language in Linux system" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.