Rust
Rust is Programming languages
Rust 101
Writing An Interpreter In Rust して、Wasm で動かしてみた - wadackel.me
Learn Rust Programming Course – Interactive Rust Language Tutorial on Replit
why rust
The Rust Programming Language Forum
rust book stable
The Epic Story of Dropbox's Exodus From the Amazon Cloud Empire | WIRED #dropbox
Yet Another Bioinformatic blog #bioinfomatics
https://www.rerun.io/blog/why-rust
Introduction - The Rustonomicon
Rustで高速な標準出力 | κeenのHappy Hacκing Blog
visvirial/sccache-action: A GitHub Action that speeds up Rust compilation with sccache.
http://blog.pnkfx.org/blog/2015/10/27/gc-and-rust-part-0-how-does-gc-work/ #gc
take in std::mem - Rust
Arc<Mutex<T>>という形はデザインパターン - Rustコトハジメ
Rust tests
install
rustup使うのがいいみたい
$ rustup update stable
rustup -> rustc -> cargoみたいな感じで全部はいるのかな?
Basic usage - The rustup book
Editions
What are editions? - The Rust Edition Guide
開発スタート
First Steps with Cargo - The Cargo Book
cargo
rls
https://github.com/rust-lang/rls/issues/1273
vscode
tools
nannou
https://github.com/google/evcxr/blob/master/README.md
[update https://doc.rust-lang
std::process::Command
プロセスを作成
https://keens.github.io/blog/2016/12/02/rustnopurosesu/
ownership
Rust ownership
所有権と借用について - Qiita
所有権の移動に関して許されるのは「Ownerが、貸与中でないオブジェクトの所有権を移動すること」だけである。Ownerが、貸与中オブジェクトの所有権を移動することはできないし、また、Borrowerが、借用中オブジェクトの所有権を勝手に移動することもできない。
key feature
memory management
スコープから外れたときに自動的ににメモリーを開放する=drop
referenceしたとき=borrowしたときはownershipは持たない=スコープから抜けてもdropしない。
さらに、変数を変更できない。
mutable referenceも可能だが、一つしか存在し得ない
文字列リテラルは変更できないが文字列型の変数は可能
リテラルはメモリ上に固定されるため
だから早い
Stringは配列への参照
mutable 参照はスコープ内でひとつ
https://doc.rust-lang.org/book/2018-edition/ch04-02-references-and-borrowing.html#mutable-references
mutable refとrefは同時にだめ。
ヒープはmoveされて前の変数(ポインタ)は無効になるがスタックはshallow copyだから無効にはならない
https://doc.rust-lang.org/book/2018-edition/ch04-02-references-and-borrowing.html#mutable-references
参照先がない参照の防止
デスクトップアプリ
https://github.com/Boscop/web-view