Rust for Linux
Rust for Linuxは、C言語とアセンブリ言語のみを使用して記述されてきたLinuxカーネル内部のソフトウェアで使用できるプ�…
この項目「Rust for Linux」は翻訳されたばかりのものです。不自然あるいは曖昧な表現などが含まれる可能性があり、このままでは読みづらいかもしれません。(原文:英語版 "Rust for Linux" 2026年4月2日 (木) 15:29 (UTC)) 修正、加筆に協力し、現在の表現をより自然な表現にして下さる方を求めています。ノートページや履歴も参照してください。(2026年4月) |
|
Linuxのマスコットであるタックスが、Rustのロゴの上に重ねられている | |
| 開発元 |
|
|---|---|
| 初版 | 2022年10月1日 |
| リポジトリ |
github |
| プログラミング 言語 | Rust |
| 対応OS | Linux |
| 対応言語 | 英語 |
| ライセンス | GPL-2.0-only with Linux-syscall-note. |
| 公式サイト |
rust-for-linux |
Rust for Linuxは、C言語とアセンブリ言語のみを使用して記述されてきたLinuxカーネル内部のソフトウェアで使用できるプログラミング言語としてRustを追加することを目的とした2020年に開始された進行中のプロジェクトである。このプロジェクトはカーネルドライバを記述する際のバグを減らすためにRustのメモリ安全性を利用することを目指している[1]。プロジェクトの進捗はRustの支持者とLinuxカーネルプロジェクトのリーダーのリーナス・トーバルズの両方が期待したよりも遅れている[2]。2023年12月、Rustで記述された最初のドライバが受け入れられ、Linuxカーネル 6.8でリリースされた[3][4]。2025年12月、LinuxカーネルでRustはもはや実験的なものではなく、Rustによる開発がカーネル開発の公式な一部になったことが発表された[5]。
歴史
Linuxカーネルは1991年の最初のリリース以来、主にC言語とアセンブリ言語で記述されてきた。1997年頃にはC++の追加が検討され、2週間ほど実験されたが、その後中止された[6]。Rustは2006年に開発が開始され、メモリ安全性に重点を置きながらC言語などの低水準言語の性能の実現と、ユーザビリティなプログラミングツールと構文を組み合わせている[7]。
Rustを使用して記述された外部ローダブル・カーネル・モジュールの例が2013年にTaesoo Kimによって公開された[8][9]。
Rust for Linuxプロジェクトは2020年にLinuxカーネルメーリングリストで発表され、Linuxプロジェクト内で使用できるプログラミング言語としてRustを追加することを目標としていた[10]。Open Source Summit 2022でリーナス・トーバルズは、このプロジェクトの成果の取り込みはLinux 5.20[注釈 1]のリリースからすぐに開始できると述べた[11]。Linux 6.0の最初のリリース候補版はRustのサポートがない状態で2022年8月14日に作成された。Linux 6.0-rc1のリリースノートでリーナスはRustのサポートを追加するという彼の意向を表明し、「実際には、最初のRustの基盤とマルチ世代LRU VMが実現することを期待していたが、今回はどちらも実現しませんでした」と述べた[12][13]。2022年9月19日、ZDNetの記事でリーナスからの「なにか異常なことが起こらない限り、RustはLinux 6.1に組み込まれるだろう」という電子メールが明らかになった[14]。
2022年10月、Rust for Linux向けの実装を受け入れるためのプルリクエストがリーナスによって承認された[15]。Linux 6.1時点では、開発者が機能をテストできるようにするために、サポートは意図的に最小限に抑えられていた[16]。
Rust for Linuxの開発者たちは再割当てしてはならないメモリを安全かつ適切にエラーを処理して初期化するための新しいライブラリ「pinned-init」を作成した[3]。これはLinux 6.4で最初に導入され[17]、その後のバージョンで改良が加えられている[3]。
Linux 6.10でRISC-VがRustをサポートするアーキテクチャとして追加された[18]。
2024年7月、Linuxに複数のRustのバージョンをサポートする最初の変更が採用され、2024年5月2日リリースのRust 1.78と2024年6月13日リリースのRust 1.79のどちらを使用してもコンパイルできるようになった[19]。
2024年8月現在[update]、Rust for LinuxはRustコンパイラの不安定な機能に依存している[1]。
2025年12月、Linuxカーネルサミットにおいて、Rustを実験的段階からカーネルのコア部分に昇格させることが決定された[5]。これにより、Linuxカーネルのコア言語にC言語とアセンブリ言語に加えてRustが追加された。
利用例

Linuxカーネルには以下のRustで記述されたコンポーネントが含まれている:
- rnull、nullデバイスの完全互換品[3][20]
- ASIX AX88772AとRealtek Generic FE-GEの物理層ネットワークドライバ[3][4][21][22]
- QRコードを表示するDirect Rendering Managerカーネルパニックハンドラ[19][23]
LinuxでRustを使用しているその他の著名なプロジェクトには以下のようなものがある:
- tarfs、tarファイルシステム[3][24]
- NVM Express(NVMe)デバイスドライバ[3]
- Android Binder IPCドライバ[10][3][25]
- Asahi LinuxのAppleシリコンAGX GPU DRMドライバ[26][3][27]
- PuzzleFS、コンテナファイルシステム[3][28][24]
- 読み取り専用のext2ファイルシステム[24]
- Nova、Rustで記述されたnouveau Nvidia GPUドライバを作成することを意図しており、freedesktop.orgプロジェクトの基盤上で開発されている[29][30]
脚注
注釈
- ^ 後のLinux 6.0。
出典
- ^ a b Vaughan-Nichols, Steven. “Rust in Linux: Where we are and where we're going next”. zdnet. 2024年8月31日閲覧.
- ^ “Linus Torvalds talks AI, Rust adoption, and why the Linux kernel is 'the only thing that matters'”. zdnet. 23 August 2024. 2024年8月31日閲覧.
- ^ a b c d e f g h i j “An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise”. usenix. ;login: (2024年7月1日). 2024年9月4日閲覧。
- ^ a b Das, Ankush (11 March 2024). “Linux Kernel 6.8 Released! Goes Big On Hardware Support”. news.itsfoss.com. 2024年9月4日閲覧.
- ^ a b Leemhuis, Thorsten (December 10, 2025). “Linux Kernel: Rust Support Officially Approved”. heise.de. 2025年12月12日閲覧.
- ^ Claburn, Thomas (2022年6月23日). “Linus Torvalds says Rust is coming to the Linux kernel” (英語). The Register. 2022年7月28日時点のオリジナルよりアーカイブ。2022年7月25日閲覧。
- ^ Perkel, Jeffrey M. (2020-12-01). “Why scientists are turning to Rust” (英語). Nature 588 (7836): 185–186. Bibcode:2020Natur.588..185P. doi:10.1038/d41586-020-03382-2. PMID 33262490. オリジナルの2022-05-06時点におけるアーカイブ。 2022年8月4日閲覧。.
- ^ Vaughan-Nichols, Steven J. (5 October 2022). “Rust in the Linux Kernel”. thenewstack.io. 2024年8月31日閲覧.
- ^ “Memory Safety for the World's Largest Software Project” (2022年6月23日). 2024年8月31日閲覧。
- ^ a b Simone, Sergio De (2021年4月27日). “Using Rust to Write Safe and Correct Linux Kernel Drivers” (英語). InfoQ. 2022年9月22日時点のオリジナルよりアーカイブ。2022年8月4日閲覧。
- ^ Vaughan-Nichols, Steven (2022年6月27日). “Linus Torvalds is cautiously optimistic about bringing Rust into Linux kernel's next release” (英語). ZDNet. 2022年8月12日時点のオリジナルよりアーカイブ。2022年8月4日閲覧。
- ^ Tung, Liam (2022年8月15日). “Linux 6.0 arrives with performance improvements and more Rust coming” (英語). ZDNet. 2022年9月7日時点のオリジナルよりアーカイブ。2022年9月7日閲覧。
- ^ Torvalds, Linus (2022年8月14日). “Linux 6.0-rc1”. LWN.net. 2022年9月7日閲覧。
- ^ Vaughan-Nichols, Steven (2022年9月19日). “Linus Torvalds: Rust will go into Linux 6.1” (英語). ZDNET. 2023年1月19日時点のオリジナルよりアーカイブ。2022年9月20日閲覧。
- ^ Proven, Liam (2022年10月5日). “Linux 6.1: Rust to hit mainline kernel” (英語). The Register. 2022年10月12日時点のオリジナルよりアーカイブ。2022年10月12日閲覧。
- ^ “Next steps for Rust in the kernel”. LWN.net. 2023年6月8日時点のオリジナルよりアーカイブ。2023年5月3日閲覧。
- ^ “More Rust Code Readied For Linux 6.4”. phoronix.com. 2024年8月31日閲覧。
- ^ Knop, Dirk (July 27, 2024). “Linux-Kernel 6.10: Verbesserte Dateisysteme und neue Treiber”. heise.de. 2024年8月31日閲覧.
- ^ a b Leemhuis, Thorsten (August 29, 2024). “Linux kernel gets "blue screens" with QR code”. heise.de. 2024年8月31日閲覧.
- ^ “Rust Null Block Driver Published To Begin Experimenting With Rust For Linux Storage”. phoronix.com. 2024年8月31日閲覧。
- ^ “The First Rust-Written Network PHY Driver Set To Land In Linux 6.8”. phoronix.com. 2024年8月31日閲覧。
- ^ “Rust abstractions for network PHY drivers”. 2024年8月31日閲覧。
- ^ “Add a QR code panic screen”. 2025年6月16日閲覧。
- ^ a b c “Microsoft Engineer Ports EXT2 File-System Driver To Rust”. phoronix.com. 2024年8月31日閲覧。
- ^ “Rust in the Linux kernel”. Google Security Blog (2021年4月14日). 2024年8月31日閲覧。
- ^ Corbet, Jonathan (2 September 2024). “Whither the Apple AGX graphics driver?”. LWN.net. 2024年9月5日閲覧.
- ^ “Initial Rust DRM Abstractions, AGX Apple DRM Driver Posted For Review”. phoronix.com. 2024年8月31日閲覧。
- ^ “PuzzleFS Continues Striving To Be The Best File-System For Containers”. phoronix.com. 2024年8月31日閲覧。
- ^ Das, Ankush (21 March 2024). “Red Hat Unveils a Rust-based 'Nova' Driver: A Better Nouveau for Nvidia GPUs”. news.itsfoss.com. 2024年9月4日閲覧.
- ^ “Red Hat's Long, Rust'ed Road Ahead For Nova As Nouveau Driver Successor”. phoronix.com. 2024年8月31日閲覧。
関連項目
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.