TL;DR 並行処理を実装する人のこれからのスタンダードになる一冊。買い。 並行プログラミング入門 ―Rust、C、アセンブリによる実装からのアプローチ 作者:高野 祐輝 オライリージャパン Amazon 買ったら思いの外早く届いたのでパラパラと読み始めたら一気に読み終えてしまった。 総評 敢えて雑な喩え方をするなら The Art of Multiprocessor Programming (通称TAoMP本) の内容を薄めてRustやアセンブラや計算モデルを足したような本だった。 日本語の書籍としてはかなり珍しくWait-Free, Lock-Free, Obstruction-Freeの違いなどを適切に論じており、TTAS Lock, MCS Lock, TL2といった日本語では希少な情報が書かれているレアな本である。これらに付いて論じている日本語の本は知る限り (TAoMP本と昔僕
最近、Rust の Future と async/await の使い方を調べたのでメモしておきます。 最初の例 まず、HTTP サーバーにリクエストを送ってレスポンスを出力するプログラムを書いてみます。 // [dependencies] // tokio = { version = "1.9", features = ["full"] } // reqwest = "0.11" type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>; #[tokio::main] async fn main() -> Result<()> { let resp = reqwest::get("https://httpbin.org/get").await?; let body = resp.text().await?; pr
axum version0.2.0 is released!! 本日2021-08-24、axum version0.2.0がリリースされました。 この記事のコードを参考にする場合はバージョンによる違いに注意してください。 2021-08-14追記 axum 0.1.2, 0.1.3のリリースによりこの記事の一部の記述は古いものとなりました。 この記事に関わる変更は以下です。 多くのextractorが Deref を実装した axum が hyper::Server をre-exportするようになった extract::UrlParams と extract::UrlParamsMap が非推奨となり、 extract::Path が推奨されるようになった axum 0.1.3対応版のコードは https://github.com/techno-tanoC/axum_sample/tr
Introduction Participation If you are interested in contributing to this book, check out the contribution guidelines. News 2024-03-17: You can now download the book in PDF format from this link. Design patterns In software development, we often come across problems that share similarities regardless of the environment they appear in. Although the implementation details are crucial to solve the tas
パターンマッチを持つ言語では、変数束縛とコンストラクタ/定数が構文上曖昧である場合がある。Rustでは以下の規則に従っている。 以下のように、構文的にパスであるとわかる場合は、常にコンストラクタ/定数とみなす。 :: を含んでいる場合。 (::A, self::A, <T as Trait>::X など) {} を後続する場合。 (A {} など) () を後続する場合。 (A() など) ../.../..= などの一部である場合。 (FOO_MIN .. FOO_MAX など) ! を後続する場合。 (your_macro_expanding_to_a_pattern!() など) 反駁不可文脈では常に変数束縛とみなす。反駁不可文脈かどうかは以下のように定義される。 match, if let, while let のパターンは反駁可能でもよい。 let, for, 関数の引数部のパタ
CargoのクレートのバージョンはSemantic Versioning(SemVer)によって互換性が担保されている1ので、ライブラリの利用者はcargo updateを実行するだけで互換性を保ったまま依存ライブラリをアップデートできます。 しかし、それはあくまでライブラリとアプリケーションの双方でバージョンの設定が適切に行われた場合の話であり、これが不十分であった場合はcargo updateを実行した途端にコンパイルが通らなくなってしまうといったことが起こりえます。 この記事では適切なバージョニングのための基本的な考え方を掴むことを目標とします。記事の前半ではCargoにおける依存クレートのバージョンの扱いについて述べ、それを踏まえて後半ではライブラリ作者向けにバージョニングに関するルールや慣習について述べていきます。 Semantic Versioning Cargo固有の問題に進
I think the Rust language is a big success. When I think back on it I am in awe: so much had to go right to get where we are, and there were so many opportunities to go wrong. It took many tiny miracles for the Rust language to become what it has. Those miracles didn’t happen by accident though: each one was created by a real person, and real people orchestrated them to become something great. The
Are we game yet? Almost. We have the blocks, bring your own glue. Get Started Since you ended up here, you probably agree that Rust is potentially an ideal language for Game Development. Its emphasis on low-level memory safe programming promises a better development process, less debugging time, and better end results. While the ecosystem is still very young, you can find enough libraries and game
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く