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
プログラミング言語Rust
Search
Yusuke Hosonuma
November 09, 2016
Technology
770
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プログラミング言語Rust
Rustの紹介的な勉強会
Yusuke Hosonuma
November 09, 2016
More Decks by Yusuke Hosonuma
See All by Yusuke Hosonuma
KotlinTest で始める Property-based Testing/kotlintest-property-based-testing
yusukehosonuma
2
1.6k
Marzipan の正体は何だったのか そして SwiftUI の衝撃/wwdc19_marzipan_swiftui
yusukehosonuma
2
990
標準パッケージにおけるテストでの利用例から学ぶ testing / quick パッケージ/golang-testing-quick
yusukehosonuma
4
12k
Swift で ParameterizedTest をやってみた話/swift-parameterized-test
yusukehosonuma
4
2.3k
Property-based test beginning with SwiftCheck
yusukehosonuma
1
6.3k
XCTest(再)入門/reintroduction-to-xctest
yusukehosonuma
0
670
ソースコードから読み解く - Quick はどのように実装されているのか?/quick-code-reading
yusukehosonuma
7
11k
Swift 4.2 はどのような進化をしているのか/whats-new-swift42
yusukehosonuma
16
15k
HTTPモックライブラリ「Mockingjay」を使ってみた話/swift-mockingjay
yusukehosonuma
5
4.4k
Other Decks in Technology
See All in Technology
AI感のないAWS構成図をAIエージェントに描かせたい!
sagochiko
2
480
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
150
OpenClawでAzure DevOpsのWiki更新を自動化する - クラウドAIだけでは届かない場所へ
yutakaosada
0
130
PQC移行の今 -- IETF からみた現在地
satokan
4
690
20260915deck.gl-raster を使ってみた
rena1208
0
170
AIに会社の文脈を理解させる技術~上流工程・非エンジニアにも広げるハーネスエンジニアリング実践~
ochtum
0
200
Harness Engineering on Rails
joelq
0
760
地方移住と都心キャリアの両立は「金・時間・人」のリソースをフル活用すれば実現できる!〜Snowflake女子会 vol.8
snowwmn0824
0
140
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
250
メルカリにおけるAI時代の高速プロトタイピング基盤「Arca」
ryotarai
18
13k
ScotSecure West 2026 - Glasgow
raybugg
0
210
ボードゲームの遊び相手をFoundation Modelsで作る / iOSDC Japan 2026
genda
0
240
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
460
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
Un-Boring Meetings
codingconduct
0
430
How STYLIGHT went responsive
nonsquared
100
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Transcript
ϓϩάϥϛϯάݴޠ Rust
ࣗݾհ • Yusuke Hosonuma • https://github.com/YusukeHosonuma • Qiitaͨ·ʹॻ͍ͯΔΑɻ • ϚΠϯυϑϧωε࣮ફதɻ
Rustͬͯʁ
Rustͬͯʁ • Mozilla͕࡞ͬͨγεςϜϓϩάϥϛϯάݴޠ • ߴੑɺ҆શੑɺฒߦੑɺʹϑΥʔΧε • C/C++/GoͷΑ͏ʹγϯάϧόΠφϦग़ྗͰ͖Δ • Ϟμϯͳ֓೦ʢؔܕͱ͔ʣΛऔΓೖΕͯΔ •
Swift͕ӨڹΛड͚ͨݴޠͰ͋Δ
ߴʁ
ߴʁ • C/C++ͷΑ͏ͳθϩΦʔόʔϔουΛࢦ͢ • GCͳ͠ɺࢀরΧϯτͳ͠ɺͷϝϞϦཧ • Ϟμϯͳ֓೦Λαϙʔτͭͭ͠ɺΦʔόʔϔου ͕ݶΓͳ͘ൃੜ͠ͳ͍Α͏ʹߟ͑ΒΕͯΔ • ʮθϩίετநԽʯ(zero-cost
abstractions)
҆શʁ
҆શʁ • C/C++ͰϝϞϦؔ࿈ͷόά͕ઈ͑ͳ͍ • ະॳظԽ or ൣғ֎ͷྖҬʹΞΫηεͨ͠Γ • όοϑΝʔΦʔόʔϑϩʔ੬ऑੑͷѱເ •
RustͰίϯύΠϧ࣌ʹແޮͳϝϞϦΞΫηε͕ൃ ੜ͠ͳ͍͜ͱΛอূ͢Δ • ੩తܕ͚Ͱܕਪ͋Γ
ฒߦʁ
ฒߦʁ • Ұൠతʹฒߦϓϩάϥϛϯά͍͠ • ෳͷεϨου͕ಉ͡σʔλΛಉ࣌ʹಡΈॻ͖ ͠ͳ͍Α͏ʹࡉ৺ͷҙ͕ඞཁ • ࠶ݱੑͷ͍όάੜΈग़͍͢͠ • RustͰίϯύΠϧ࣌ʹσʔλڝ߹Λ͙Έ
͕͋Δ
࣮ʁ
࣮ʁ • Friends of Rust https://www.rust-lang.org/en-US/friends.html ↑࣮ϓϩμΫτʹRustΛ͍ͬͯΔ৫ • MozillaFirefoxͷϝσΟΞύʔβͰར༻
ˠ 10ԯਓҎ্͕ར༻͍ͯ͠Δͷʹɺ1݅Τϥʔ͕ ൃੜ͍ͯ͠ͳ͍ʢΒ͍͠ʣ • DropboxLINEͱ͍ͬͨେޚॴར༻͍ͯ͠Δ
Why Rust ?
Why Rust ? • C/C++ͷΑ͏ʹߴੑ͕ٻΊΒΕΔιϑτΣΞ ʢOS/υϥΠόͳͲʣʹ͍͍ͯΔ • C/C++ߴ͚ͩͲɺϝϞϦཧ҆શͰͳ͍͠ɺ ฒߦϓϩάϥϛϯά͍͠ •
ݱঢ়ͷʢGoݴޠҎ֎ͷʣϞμϯݴޠ͔ΒݟΔͱػೳ ऑ͍ʢ͖ͼ͠Ίʹݴ͑࣌Εʣ • ͦ͜ͰRustͰ͢Αʂ
ͭ·Γʁ
ͭ·Γʁ • ϙετC++Λࢦ͢ݴޠ • ߴɺ҆શɺฒྻɺʹϑΥʔΧεͨ͠ݴޠ • ࠷େͷڝ߹Dݴޠ
Hello Rust
Hello Rust fn main() { println!("Hello, world!"); // This is
macro }
ϑΟϘφονྻ
ϑΟϘφονྻ fn fib(n: u32) -> u32 { // Function definition
match n { // Pattern match 0 => 1, 1 => 1, _ => fib(n - 1) + fib(n - 2), // Recursive call } // not need `return` } fn main() { let fib5 = fib(5); // local variable (Immutable is default) println!("fib(5): {}", fib5); // `{}` is placeholder // => 8 }
Cargo(Χϧΰ)
Cargo(Χϧΰ) • Rustඪ४ͷϏϧυπʔϧ • ಉ࣌ʹύοέʔδϚωʔδϟͰ͋Δ • ͭ·ΓɺϏϧυɺϥΠϒϥϦͷμϯϩʔυɺ ґଘؔͷղܾɺΛશ෦Δ • ʮધՙʯͱ͍͏ҙຯ͕͋Δ
Rustͷ࢝Ίํ
Rustͷ࢝Ίํ • $ brew install rust • $ cargo new
hello --bin • $ cd ./hello • $ cargo run • > Hello, world!
Rust Samurai ͷಓ ʻࡶίϥͰѱ͔ͬͨͳ
Rust Samurai ͷಓ • ϓϩάϥϛϯάݴޠRustʢຊޠ༁ʣ https://rust-lang-ja.github.io/the-rust- programming-language-ja/1.6/book/ README.html • όʔδϣϯ1.6Ͱͪΐͬͱݹ͍͚Ͳ͔Γ͍͢
Rust Samurai ͷಓ • Rust by Example http://rustbyexample.com/index.html • αϯϓϧίʔυΛϕʔεʹֶͯ͠·͢ɻͨͩ͠
ӳޠɻ
Rust Samurai ͷಓ • APIϦϑΝϨϯε https://doc.rust-lang.org/std/ • ݕࡧػೳ͕ͳ͔ͳ͔༏लͰ͢ɻ
Join us?
Join us? • StackOverflowʹ͓͍ͯɺ2016ͷѪ͞ΕͯΔݴޠϥ ϯΩϯά1ҐΛ֫ಘ͍ͯ͠·͢ɻ • طʹηϧϑϗεςΟϯάʢࣗͰࣗΛίϯύΠϧʣ Λ࣮ݱ͍ͯ͠·͢ɻ • GoݴޠͷΑ͏ʹޙΖ६͕ແ͖ͯͯͨ͘͠ݴޠ
Ͱ͢ɻ • ࠷ۙʹͳͬͯར༻࣮͕֦େ͍ͯ͠·͢ɻ
Rust͍͍ͧʂ
Thanks!