Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rust、何もわからない...#6発表資料
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ryuki Kamikubo
January 27, 2023
Programming
0
1.4k
Rust、何もわからない...#6発表資料
こちらのイベントで登壇した際の発表資料です。
https://estie.connpass.com/event/270226/
Ryuki Kamikubo
January 27, 2023
Tweet
Share
Other Decks in Programming
See All in Programming
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
610
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
630
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
CSC307 Lecture 01
javiergs
PRO
0
690
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
250
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
AgentCoreとHuman in the Loop
har1101
5
250
Data-Centric Kaggle
isax1015
2
780
Gemini for developers
meteatamel
0
100
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
340
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Code Reviewing Like a Champion
maltzj
527
40k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Balancing Empowerment & Direction
lara
5
900
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
57
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
160
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
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. 最後に エンジニアメンバーでテックノートを書いています!