Rust : インストール2026/01/30 |
|
Rust をインストールします。 |
|
| [1] | Rust のインストールと動作確認です。 |
|
root@dlp:~ #
pkg install -y rust
root@dlp:~ #
rustc --version rustc 1.92.0 (ded5c06cf 2025-12-08) (built from a source tarball) # テストプログラムを作成して動作確認 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 で Hello World 動作確認 root@dlp:~ # cargo --version cargo 1.92.0 (344c4567c 2025-10-21) (built from a source tarball) root@dlp:~ # cargo new cargo-test --bin
Creating binary (application) `cargo-test` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
root@dlp:~ # cd cargo-test root@dlp:~/cargo-test # cargo build
Compiling cargo-test v0.1.0 (/root/cargo-test)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.33s
root@dlp:~/cargo-test # cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/cargo-test`
Hello, world!
|
| Sponsored Link |
|
|