Rust development environment to build

1.Rust Overview

  According to Baidu Encyclopedia saying, Rust is a systems programming language, focusing on security, particularly complicated by security, support functions and imperative programming paradigms such as generic as well as multi-paradigm language. Rust and C ++ in syntax similar, but the designers want to provide better memory performance while ensuring safety. Rust was originally created by Graydon Hoare Mozilla Design Institute, then at Dave Herman, Brendan Eich and many others contributed gradually improving. Rust designers optimize Rust Rust language and compiler through accumulated experience in R & D Servo web browser layout engine process.
  Rust compiler is free and open source software under the MIT License and the Apache License 2.0 dual protocol declaration. Rust has for three consecutive years (2016,2017,2018) in the "most popular programming language" selection Stack Overflow project developers surveyed fold to take the title. Some software companies even recommended to write the operating system with Rust.

2.Rust development environment configuration

  First, we can visit the official website, https://www.rust-lang.org/zh-CN/tools/install  , I have here is the Windows operating system. Therefore, the installation Rust, download and run the program rustup-init.exe , console and follow the prompts to install. After installing the command line  rustc --version to determine whether Rust installed correctly.

 

     Rust is the cargo package manager and build systems. Cargo --version can be used to view the version, and can use the command cargo new project name to create a new project Rust, as shown below.

 

 3. Rust compile and run the project

     Below which a file src main.ts, as shown below.

 

    In the command line by cargo build compiled, the compiler will generate a target folder, wherein the debug program executable file hello_cargo.exe, as shown below.

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/isaboy/p/rust_language_prog.html