| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

「Rust」の版間の差分

提供: MyMemoWiki
ナビゲーションに移動 検索に移動
 
(同じ利用者による、間の5版が非表示)
4行目: 4行目:
 
==Install==
 
==Install==
 
* https://www.rust-lang.org/ja/tools/install
 
* https://www.rust-lang.org/ja/tools/install
 +
===Uninstall===
 +
<pre>
 +
rustup self uninstall
 +
</pre>
 
===[[Mac]]===
 
===[[Mac]]===
 +
----
 
<pre>
 
<pre>
 
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
 
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
 +
</pre>
 +
* Rustの開発環境において、全てのツールは~/.cargo/binディレクトリにインストールされるため、PATHを通す
 +
 +
==開発==
 +
===パッケージの生成===
 +
<pre>
 +
$ cargo new --bin hello
 +
</pre>
 +
===実行===
 +
<pre>
 +
$ cd hello
 +
$ cargo run
 +
  Compiling hello v0.1.0 (/Users/hirotoyagi/Workspaces/rust/lesson/hello)
 +
    Finished dev [unoptimized + debuginfo] target(s) in 7.21s
 +
    Running `target/debug/hello`
 +
Hello, world!
 +
</pre>
 +
===クリーン===
 +
<pre>
 +
$ cargo clean
 
</pre>
 
</pre>

2022年1月17日 (月) 15:17時点における最新版

Rust

Install

Uninstall

rustup self uninstall

Mac


curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Rustの開発環境において、全てのツールは~/.cargo/binディレクトリにインストールされるため、PATHを通す

開発

パッケージの生成

$ cargo new --bin hello

実行

$ cd hello
$ cargo run
   Compiling hello v0.1.0 (/Users/hirotoyagi/Workspaces/rust/lesson/hello)
    Finished dev [unoptimized + debuginfo] target(s) in 7.21s
     Running `target/debug/hello`
Hello, world!

クリーン

$ cargo clean