| सर्वर दुनिया | गोपनीयता नीति | सहायता / संपर्क करें |
3355 / 128458196
|
Rust : स्थापित करें2023/09/21 |
|
Rust भाषा स्थापित करें।
|
|
| [1] | Rust लैंग्वेज इंस्टॉल करें और टेस्ट ऐप चलाने का प्रयास करें। |
|
root@dlp:~#
apt -y install rust-all
root@dlp:~#
rustc --version rustc 1.59.0 # परीक्षण कार्यक्रम बनाने के लिए सत्यापित करें root@dlp:~# mkdir rust-test root@dlp:~# cd rust-test
root@dlp:~/rust-test# cat > hello-rust.rs <<'EOF'
fn main() {
println!("Hello Rust world !");
}
EOF
root@dlp:~/rust-test#
rustc hello-rust.rs root@dlp:~/rust-test# ./hello-rust Hello Rust world ! # Cargo के साथ हैलो वर्ल्ड बनाने के लिए सत्यापित करें root@dlp:~# cargo --version cargo 1.59.0 root@dlp:~# cargo new cargo-test --bin
Created binary (application) `cargo-test` package
root@dlp:~# cd cargo-test root@dlp:~/cargo-test# cargo build
Compiling cargo-test v0.1.0 (/root/cargo-test)
Finished dev [unoptimized + debuginfo] target(s) in 0.44s
root@dlp:~/cargo-test# cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `target/debug/cargo-test`
Hello, world!
|