What is rustc

Time:2021-1-25

In the Hello world example given in the official website document, I see that the compiled command uses rustc.

How did rustc get here

Take windows 10 as an examplerustup- init.exe 64 bitAnd the correct installation, rustc will also be installed. deposit rustc.exe What’s the location of this%HomePath%\.cargo\bin

>dir /b
cargo-clippy.exe
cargo-fmt.exe
cargo-miri.exe
cargo.exe
clippy-driver.exe
rls.exe
rust-gdb.exe
rust-lldb.exe
rustc.exe
rustdoc.exe
rustfmt.exe
rustup.exe

What is rustc

Rustc is the compiler of the programming language rust. Rustc compiles the source code into binary code in the form of library or executable file.

In the actual project, people will not directly use rustc to compile all the files, but use the cargo command. implementcargo build --verboseYou can see how it worksrustc

reference resources:

This work adoptsCC agreementReprint must indicate the author and the link of this article

Recommended Today

New JavaScript syntax “double question mark syntax” and “optional chain syntax”

Double question mark grammar Double question mark grammarThe concept is to return the value on the right when the value on the left is null or undefined let Form = undefined ?? true; //Form = true Alternative chain syntax ? optional chain //Optional chain let body = { value: { a: ‘123321’ } } let […]