ユーザ用ツール

サイト用ツール


rust

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
rust [2023/08/03 16:38] nullponrust [2026/01/26 10:27] (現在) nullpon
行 1: 行 1:
 <markdown> <markdown>
 # rust # rust
 +
 +所有権システムと借用チェッカーによりGCを使用せずコンパイル時にメモリ安全性とデータ競合の排除を保証し、C/C++並みの実行速度を実現するシステムプログラミング言語。
  
 * https://www.rust-lang.org/ * https://www.rust-lang.org/
行 11: 行 13:
 * https://doc.rust-lang.org/cargo/getting-started/installation.html * https://doc.rust-lang.org/cargo/getting-started/installation.html
  
-``` +```bash 
-curl https://sh.rustup.rs -sSf | sh+curl https://sh.rustup.rs -sSf | sh
 ``` ```
  
行 21: 行 23:
 * cargo - パッケージ管理やビルドを行うツール、主にこれを使う * cargo - パッケージ管理やビルドを行うツール、主にこれを使う
  
-## アッデー+## 新規ロジェクの開始
  
-``` +rustupと共にインスールされる[cargo](./cargo)使用する
-rustup update +
-``` +
- +
- +
-## プロジェク作成 +
- +
-application作成+
  
 +```bash
 +cargo new <project name>
 ``` ```
-$ cargo new app_name 
-``` 
- 
-libraryを作成 
- 
-``` 
-$ cargo new app_name --lib 
-``` 
- 
-## mainファイルを変更する 
- 
-Cargo.tomlに以下を設定 
- 
-``` 
-[[bin]] 
-name = "nyan" 
-path = "src/nyan.rs" 
- 
-[[bin]] 
-name = "wang" 
-path = "src/wang.rs" 
-``` 
- 
-複数のバイナリを作成することも可能 
- 
-## 作成したアプリケーションをインストールする 
- 
-``` 
-$ cargo install --path . 
-``` 
- 
-pathにプロジェクトのルートを指定する。インストール先は $HOME/.cargo/bin 
- 
-## 依存ツリーの確認 
- 
-``` 
-cargo tree 
-``` 
- 
  
 ## アップデート ## アップデート
  
-コンパイラなどのアップデート+cargo, rustcなどrustupで管理されているtoolchainを最新版にする
  
-```+```bash
 rustup update rustup update
 ``` ```
  
-依存ライブラリ更新+## ターゲット追加と削除
  
-``` +例: wasm32-unknown-unknownを追加
-cargo update +
-```+
  
-## rust製コマンドのインストール+```bash 
 +rustup target add wasm32-unknown-unknown
  
 +rustup target remove wasm32-unknown-unknown
 ``` ```
-cargo install exa 
-``` 
- 
-* exa: lsの置き換え 
-* fd-find: findの置き換え 
-* bat: catの置き換え 
 </markdown> </markdown>
  
rust.1691080702.txt.gz · 最終更新: by nullpon