0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rust学習

Last updated at Posted at 2025-02-11

環境構築

1. rustupのインストール

  1. https://www.rust-lang.org/ja/tools/install を開く
  2. 上記ページのシェルそのまま実行してrustupを入れる curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  3. 選択肢は Proceed with standard installation で進む
  4. ターミナル再起動
  5. cargo コマンドが動けばok

2. エディタ設定

  1. vscode開く
  2. 拡張機能 rust-analyzer を入れる
  3. clippyいれる
    1. 歯車でvscodeの設定開く
    2. 赤枠のボタン押して設定をjson形式で開く
      スクリーンショット 2025-02-11 16.31.21.png
    3. "rust-analyzer.check.command": "clippy" と追記して保存

3. リポジトリ作成

  1. cargo init rust_practice (これで .git 込のpjが生成)
  2. cd rust_practice
  3. cargo run すると Hello, world! が表示される

hello world

  1. cargo build すると target/debug/rust_practice が生成される(pj名と同じものが出来るので rust_practice となっている)
  2. target/debug/rust_practice と直接バイナリ実行でも Hello world! ひょうじされr
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?