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、何もわからない...#6発表資料
Search
Ryuki Kamikubo
January 27, 2023
Programming
1.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rust、何もわからない...#6発表資料
こちらのイベントで登壇した際の発表資料です。
https://estie.connpass.com/event/270226/
Ryuki Kamikubo
January 27, 2023
Other Decks in Programming
See All in Programming
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
270
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
270
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
The Rails Doctrine Decade
koic
2
590
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
290
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
Domain-Driven Transformation
hschwentner
2
2.3k
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
580
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Typedesign – Prime Four
hannesfritz
42
3.2k
Chasing Engaging Ingredients in Design
codingconduct
0
360
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Deep Space Network (abreviated)
tonyrice
0
370
Transcript
Copyright © LabBase, Inc. All Rights Reserved. LabBaseのサービスプラットフォームの データ収集機能開発にRustを活用した話 株式会社LabBase
プラットフォーム開発本部 上久保 竜輝
Copyright © LabBase, Inc. All Rights Reserved. 自己紹介 上久保 竜輝(Kamikubo
Ryuki) 趣味 > テニス、ランニング、ボドゲ、競プロ(過去形) ソフトウェアエンジニア > frontend : backend = 6:4 > React,TypeScript,Rust,Python,PHP(Laravel) 職歴 > 2019年 4月 大手通信会社 入社 > 2021年10月 株式会社LabBase 入社 最近の興味 > アーキテクチャ,DDD,インフラ周り強くなりたい
Copyright © LabBase, Inc. All Rights Reserved.
Copyright © LabBase, Inc. All Rights Reserved. サービス紹介
Copyright © LabBase, Inc. All Rights Reserved.
Copyright © LabBase, Inc. All Rights Reserved. 約1年前 CTO「Rustやろう」ぼくら「「「はい」」」 Rustで業務開発経験あるエンジニアなし、無茶振りに焦る
> 新しい技術を学ぶのはみんな好き
Copyright © LabBase, Inc. All Rights Reserved. 現在 エンジニアの半数以上がRustで開発している 新規開発のバックエンドは基本的にRust
プラットフォーム基盤などの重要なシステムにもRustを利用 > 実はCTOの無茶振りのおかげで仕事でRustがかなり書ける会社です!!
Copyright © LabBase, Inc. All Rights Reserved. 自分がRustで開発したプロダクト紹介: 企業マスタ 企業情報をバッチ処理で
外部APIを叩いて取得 社内の他プロダクトがア クセスできるようにgRPC サーバを構築
Copyright © LabBase, Inc. All Rights Reserved. 自分がRustで開発したプロダクト紹介: 研究室データ投入 集めた大量の研究室や指導
教官に関するデータを投入 するツール > JSON形式のデータをparseして DB投入
Copyright © LabBase, Inc. All Rights Reserved. 最初はやっぱり大変 無限に所有権で怒られる >
所有権やCopyトレイトを学んで 解決
Copyright © LabBase, Inc. All Rights Reserved. Rust、何もわからない... スマートポインタわからん 動的ディスパッチわからん
ライフタイム注釈わからん > 見た目がいかつくて怖い(※個人の感想で す) > 文法がわかっても存在理由や使い道がしっ くりきていない
Copyright © LabBase, Inc. All Rights Reserved. 慣れてくると段々いい感じに Option型、Result型によるエ ラーハンドリング便利
> ?やmap_errなどを使うとネストが 深くならなくて可読性保てる
Copyright © LabBase, Inc. All Rights Reserved. よかったこと SeaORMいい感じだった >
Seeding,Migration,Entity自動生 成など一通りできる > MockのConnectionなど簡単に作れ てテスト書きやすい
Copyright © LabBase, Inc. All Rights Reserved. よかったこと ユニットテストを実装と同ファイルに書くと、見通し良い
Copyright © LabBase, Inc. All Rights Reserved. 学んだこと ソフトウェアアーキテクチャを 実現するのにRustは向いている
なと思った > 階層ごとにpublic設定しないとアク セスできないので、意図しない公開を 防げる [lib.rs] pub mod models; [models.rs] pub mod laboratory; [laboratory.rs] pub mod lab_name;
Copyright © LabBase, Inc. All Rights Reserved. 学んだこと > domainやinfra層をそれぞれ別の
パッケージとして実装。変更差分の あるパッケージだけビルドできる し、各層間の依存関係も表現できる > テックブログ書きました 企業マスタのディレクトリ構成
Copyright © LabBase, Inc. All Rights Reserved. 学んだこと Rustは早いと言われているが、遅 く書けてしまう(当たり前)
> clone(),to_owned()祭り > 遅いアルゴリズム、不必要なSQLでの呼 び出しなどなど
Copyright © LabBase, Inc. All Rights Reserved. 感じたこと Rustじゃなきゃダメっていう問題解決的な動機での導入では ないが、様々な言語の良い部分がRustに取り入れられてお
り、他の言語からやってくると新たな発見があって楽しい > CargoやCrateの充実もそう > エラー文がとても親切・アドバイスもしてくれる(clippyもいい)
Copyright © LabBase, Inc. All Rights Reserved. 感じたこと 所有権の概念と冗長なコードに慣れれば走り出せる >
実際に開発しながら、これなんだろ?で調べるの繰り返しがいいと思 う つよつよな人が多いおかげでネットで本質的な情報を探しや すい!
Copyright © LabBase, Inc. All Rights Reserved. まとめ Rustは開発しながら学習意欲、知的好奇心を満たせる >
仕様を学ぶごとに2週目ダンジョンの隠しステージが見えてくるよう Rustの難しさは必要な複雑性、自分の理解の甘さ 業務開発の中でアーキテクチャ、アルゴリズムなど疎かにし ない、あくまで総合格闘技
Copyright © LabBase, Inc. All Rights Reserved. 最後に LabBaseで一緒に開発する仲間を募集中です!Rustに興味がある皆 さん是非!
• ソフトウェアエンジニア • リサーチエンジニア
Copyright © LabBase, Inc. All Rights Reserved. 最後に エンジニアメンバーでテックノートを書いています!