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
650
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
More Decks by kotetu (kotetuco)
See All by kotetu (kotetuco)
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
260
STORES決済iOSアプリの決済端末2対応リリースフロー / ebisu.mobile-12-kotetu
kotetuco
0
89
CryptoKit ではじめる暗号技術 - メッセージ認証コード編 / iosdcjapan-2025-cryptokit
kotetuco
1
390
認証体験向上のために passkeys (パスキー) に対応する 〜 メリット・対応方法について / iosdcjapan-2023-passkeys
kotetuco
3
2.5k
着信時氏名表示させたいエンジニア vs 簡単には着信時氏名表示できない電話番号 (iOS13対応版) / iosdcjapan-2020-lt-calldirectory
kotetuco
2
1.5k
UIImage and CIImage for Image Processing
kotetuco
9
7.3k
Metal for data-parallel computations
kotetuco
1
1.9k
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
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
mrbgem 三角測量 開発
ogom
0
200
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
300
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
760
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
ジョジョの世界をXRで再現する
mofurune
0
130
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
310
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.9k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
Agents on Rails - Rails at Scale 2026
irinanazarova
0
340
Are APIs Still Relevant in the AI Era?
soyuka
0
420
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
sira's awesome portfolio website redesign presentation
elsirapls
0
440
Un-Boring Meetings
codingconduct
0
440
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Visualization
eitanlees
153
17k
Leo the Paperboy
mayatellez
10
2.3k
Being A Developer After 40
akosma
91
590k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Test your architecture with Archunit
thirion
2
2.4k
Transcript
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