Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OS Developer として Rustを使ってみる/using-rust-for-os-d...
Search
kotetu (kotetuco)
November 21, 2016
Programming
660
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OS Developer として Rustを使ってみる/using-rust-for-os-developer
Rust入門者の集い (2016.11.21)でLT発表を行った際に使った資料です。
kotetu (kotetuco)
November 21, 2016
Transcript
16 slides
OS Developer ͱͯ͠ RustΛͬͯΈΔ Rustೖऀͷू͍ (2016.11.21) @kotetu
܀ࢁ ప (@kotetu) • Github : kotetuco • SansanגࣜձࣾͰiOSΞϓϦ࡞ͬͯ·͢ •
໊ཧΞϓϦͷձࣾ • ʮͦΕɺૣ͘ݴͬͯΑ͒ʯͷCMͰ͓ͳ͡Έ
͔͜͜Β iOS OS ͷͰ͢ɻ
ࣗ࡞OS • ֶੜ࣌ʹগ͍ͬͯͨ͠ • ʮ30ͰͰ͖ΔOSࣗ࡞ೖʯ(໊ஶ) Ͱݴ͏ͱ 23͘Β͍·Ͱ
Rustͱͷग़ձ͍ • OS͕ॻ͚Δݴޠ͕͋Δͧ • SwiftͬΆ͍ॻ͖ํ͕ग़དྷΔͬΆ͍ͧɹɹɹɹ (ྺ࢙తʹRustͷํ͕ઌͰ͚͢Ͳɾɾ) • ੲॻ͍͍ͯͨOSΛRustͰॻ͖ͯ͠ΈΔʁ
ͱ͍͏Θ͚Ͱɺ࢝ΊͯΈͨ • ructiss • https://github.com/kotetuco/ructiss • OSͱͯ͠·ͩԿͰ͖͍ͯͳ͍ (ٽ • Rust΄ͱΜͲॻ͍͍ͯͳ͍
(ٽ
ը໘ΛനృΓͰ͖ͳ͍ (ٽ
։ൃڥʁ
DockerfileίϯςφԽ͠·ͨ͠ • rust-baremetal • https://github.com/kotetuco/rust- baremetal • ΤϛϡϨʔλʹ͍ͭͯผ్QEMUͳͲΛ ༻ҙ͍ͯͩ͘͠͞
RustͰOSΛॻ͘ϝϦοτ(1/2) • ҆શੑɺϝϞϦཧ • ඪ४͕Πϛϡʔλϒϧͳͷྑ͍ͳ • “unsafe”ϒϩοΫͰΞϯηʔϑίʔυΛݶఆ • ιϑτΣΞͷ҆શੑ͕ٻΊΒΕΔʹ ͑ΔͷͰʁ
RustͰOSΛॻ͘ϝϦοτ(2/2) • OS meets ؔܕݴޠ (ͬͯΈ͍ͨ) • OS meets Reactive
Programing ɹɹɹɹ (RxRustͬͯΈ͍ͨ) • Cargo(ϏϧυɾύοέʔδϚωʔδϟ)ͷଘࡏ • C/C++ͱͷI/F
RustͰOSΛॻ͘ࡍͷཹҙ • NightlyϏϧυͰ͔͠։ൃͰ͖ͳ͍ • IntelΞʔΩςΫνϟҎ֎ͷϓϥοτϑΥʔϜ ʹ͍֤ͭͯίϛϡχςΟʹґଘ
ϓϥοτϑΥʔϜαϙʔτঢ়گ (Getting StartedΑΓ) • 1ڃ(Ϗϧυग़དྷ͔ͭಈ͘͜ͱΛอূ͢Δ) • IntelΞʔΩςΫνϟ(32/64bit, Win/Mac/Linux) • ARMܥAndroid,
iOSͳͲ3ڃ (αϙʔτର ͕ͩɺެࣜͰมߋཧߦ͍ͬͯͳ͍)
·ͱΊ • ͜Ε·ͰC/C++͡Όͳ͍ͱॻ͚ͳ͔ͬͨ ʹ͍ͭͯɺ༗ྗͳผͳબࢶ͕Ͱ͖ͨ • ίϛϡχςΟΛΓ্͍͛ͯͬͯɺC/C++Έ ͍ͨʹ༷ʑͳͰΘΕͯ΄͍͠ͳ
͓·͚ɿനృΓࣦഊίʔυ(ൈਮ) fn write_mem8(addr:u32, data:u8) { unsafe { asm!("mov BYTE PTR
[$0], $1" : : "r"(addr), "r"(data) : : "intel"); } } pub extern fn init_os() { let vram_address = 0x000a0000; for offset in 0x00000000..0x00010000 { let vram: *mut u8 = 0x000a0000 as *mut u8; write_mem8(vram_address + offset, 0x0f); } }
༨ஊɿࣗ࡞OSͷํͷʹ͍ͭͯ • ʮࣗ࡞OS͘͘ձʯʹࢀՃ͍ͯ͠·͢ • ࣍ճ 11/26() ։࠵ • https://atnd.org/events/82288
More Decks by kotetu (kotetuco)
See All by kotetu (kotetuco)
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
290
STORES決済iOSアプリの決済端末2対応リリースフロー / ebisu.mobile-12-kotetu
kotetuco
0
100
CryptoKit ではじめる暗号技術 - メッセージ認証コード編 / iosdcjapan-2025-cryptokit
kotetuco
1
430
認証体験向上のために passkeys (パスキー) に対応する 〜 メリット・対応方法について / iosdcjapan-2023-passkeys
kotetuco
3
2.6k
着信時氏名表示させたいエンジニア vs 簡単には着信時氏名表示できない電話番号 (iOS13対応版) / iosdcjapan-2020-lt-calldirectory
kotetuco
2
1.5k
UIImage and CIImage for Image Processing
kotetuco
9
7.4k
Metal for data-parallel computations
kotetuco
1
2k
Preparing for Swift 5 Ownership
kotetuco
0
5.1k
プログラミング言語RustとOS開発/rust-os-develop-introduction
kotetuco
0
1.8k
Other Decks in Programming
See All in Programming
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
310
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
420
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
240
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
0
130
AI-Powered Domain-Driven Design
ziobrando
0
440
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
150
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
350
Are puppies a ranking factor?
jonoalderson
2
4.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
300
Speed Design
sergeychernyshev
33
2.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k