100 Exercises To Learn Rust を題材に Qiita Engineer Festa 2024 投稿マラソン に参加していました! 7月17日に仮置きを残しながら投稿したのち、 ようやく全記事完成しました! ので、その記念として、色々話したいと思います!(え、7/17ってもう3週間前...?!) 目次 全記事一覧 100 Exercises To Learn Rustを完走した感想 100 Exercisesの魅力 1. そこそこの長さ 2. 無理のない学習順序 3. 各エクササイズ間に関連がある 4. 効率よく"ミソ"を摂取できる Rustで今まで勘違いしていたこと3選 1. Copy は Clone::clone を...呼び出さなかった! 2. 不変参照は...実は不変ではなかった! 3. 値がスレッドを跨ぐには 'static は...不要だった! 所感 ※
概要 京大マイコンクラブ(KMC)の新入生プロジェクト2022という枠組みで、「Rust を知ろう 2022」というのを開催した。先日それがついに完結したので、とりあえずスライドをまとめた。*1 www.kmc.gr.jp 第0回~第7回の8回構成で行った。毎週金曜日の 20:00 開催なのだが、必ず当日にスライドを作り始めるので、スライドが十分出来上がって開催できる自信が発生して初めて開催を告知するという体たらくだった。 注:Rust Playground へのリンクは一部誤っている可能性があります。なんか複数のタブでたくさんリンクを生成したときに上手く行かないことがあるっぽい? 構成の上で意識したこと 「Rust は難しい言語である」という思いを抱かせない そのために、所有権の話とかはギリギリまで先延ばしにし、それまでは全力でごまかす 「Rust は便利な言語である」ということを伝える
Rust + Docker + GitHub Actions = めちゃ遅い 以前、GitHub Actions 上の Rust ビルドを高速化する記事を書いたけど、 今回は Kubernetes 環境にスムーズに移行できるよう Docker イメージ化するという要件も加わったことで、改めて試行錯誤する必要が出てきた。 それぞれに対するビルド速度の最適化は存在しているものの、3つ (Rust, Docker, GitHub Actions) すべてを満たすとなるとコピペで終わるほど情報がまとまってないし、見つけた Tips もちょっと古かったり、これというものは見つけられなかった。 公式ドキュメントを見ると正当進化していて新しいオプションが生えていたりしたので、賞味期限は短そうだけど、自分の試行錯誤の結果を残しておこうと思う。 成果としては 12 分 22 秒かかっていた Rust アプリ
Download Chapter 1: FOUNDATIONS For developers who’ve mastered the basics, this book is the next step on your way to professional-level programming in Rust. It covers everything you need to build and maintain larger code bases, write powerful and flexible applications and libraries, and confidently expand the scope and complexity of your projects. Author Jon Gjengset takes you deep into the Rust p
こんにちは😉 @ryokotmngです。 今日は社内ドキュメントの、Rust初心者向けのクックブックを公開しようと思います。 私自身コードを書くのに四苦八苦していた頃にとても助けられたので、Rustをはじめたばかりの方の参考になれば嬉しいです。 目次 [toc] はじめに この記事では、The Bookに記載されている知識を前提としています。 Rustを全く書いたことがない方は、先に読んでみることをお勧めします。 サンプルコードが結構長いこと、実行環境があった方が良い内容も多いことから、サンプルコードは大体Rust Playgroundのリンクとなっています。 ぜひご自身で修正して遊んでみてください。 単位つきの計算を型で厳格に縛る 例えば複数の長さの単位 (mm, cm, mなど) を扱う場合に、単位が合っていない長さ同士の計算をする場合、単位を揃える必要がありますね。 この時、最終的
所有権(ownership)と借用(borrowing)とライフタイム(lifetime)はRust特有の言語仕様として有名である。 Rustではガベージコレクション(GC)を使用せずにメモリ安全性を確保するために所有権と借用とライフタイムの仕様を採用している。 この機構によって、Rustではプログラマが変数の値が有効である範囲を意識する必要がある代わりに、GCに関する実行時のオーバーヘッドがなくともメモリ安全でありスレッドセーフであるプログラムを記述することができる。 一方で、所有権は「『変数が値の所有権を持っている』というのは結局何のことなのかわからない」という混乱を生む要因でもある。 単純に考えると、変数に値が入っているのだから、変数が値を持っているのは当然のことのように思える。 そうすると、「値の所有権を持つ」とは一体何のことを言っているのかがはっきりとしなくなってしまう。 この混
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
2 年前に書いた記事 Command Line Tool を作ってみる in Rust が今でも参照されることがあるようなので、2020 年版にアップデートした内容を書いていきます。 概要 この記事では Rust で Command Line Tool を作るときに、便利なライブラリ、ツール、そしてサービスを紹介します。主に CLI working group が取り組んでいる Command Line Applications in Rust(以後 Book と呼称)のアップデート内容が中心です。その他にプラスアルファして個人的に便利だと思うツールやサービスを紹介していきます。 こちらに完全なサンプルコードを公開しています。 見やすさの都合上、説明と直接関係のないコードや設定は省略して表示します。手元でビルドして確認したい場合はこちらのソースコードをダウンロードしてご確認ください。 エラ
A gentle intro to assembly with Rust Aug 3 2020 One of the things I’ve wanted to do for a while is really dig into assembly and get into the weeds of how programs actually run. A rework of the asm macro has recently landed in nightly rust so it seemed like a good time. And compared to some other ways I’ve tried to approach this there’s a lot less setup we need to do if we just use the rust playgro
Rust Language Cheat Sheet 8. September 2025 Contains clickable links to The Book,BK Rust by Example,EX Std Docs,STD Nomicon,NOM and Reference.REF Clickable symbols BK The Book. EX Rust by Example. STD Standard Library (API). NOM Nomicon. REF Reference. RFC Official RFC documents. 🔗 The internet. ↑ On this page, above. ↓ On this page, below. Other symbols 🗑️ Largely deprecated. '18 Has minimum ed
Practical Networked Applications in Rust, Part 1: Non-Networked Key-Value Store July 23, 2019 The PingCAP company, makers of the TiDB NewSQL database and the TiKV key-value store, have kindly made publicly available, as well as open-sourced, a set of training courses that they call the "PingCAP Talent Plan". These courses train programmers in writing distributed systems in the Go and Rust language
A key theme of the Rust 2019 roadmap is maturity. This covers a variety of topics, but a crucial one is compile times. For example, the roadmap itself has the following as the first main theme for the compiler team. Improving “core strength” by lowering raw compilation times and also generating better code (which in turn can help with compilation times) The roadmap explainer post has a “polish” se
This post adds support for heap allocation to our kernel. First, it gives an introduction to dynamic memory and shows how the borrow checker prevents common allocation errors. It then implements the basic allocation interface of Rust, creates a heap memory region, and sets up an allocator crate. At the end of this post, all the allocation and collection types of the built-in alloc crate will be av
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く