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のLINEBot SDKを自作した話
Search
Yuto Takamune
September 29, 2023
Programming
2.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RustのLINEBot SDKを自作した話
Yuto Takamune
September 29, 2023
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
1
380
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.9k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
5k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
310
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
690
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
230
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.4k
IEEE802.1X認証を導入してみた
shinbunbun_
0
340
UBICの食材管理APIを作った話
shinbunbun_
0
260
Other Decks in Programming
See All in Programming
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
190
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
780
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
170
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
240
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
130
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
0
280
5分で問診!Composer セキュリティ健康診断
codmoninc
0
330
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.1k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
10k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Un-Boring Meetings
codingconduct
0
350
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Color Theory Basics | Prateek | Gurzu
gurzu
0
390
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.6k
エンジニアに許された特別な時間の終わり
watany
108
250k
The Curious Case for Waylosing
cassininazir
1
430
Product Roadmaps are Hard
iamctodd
55
12k
Transcript
RustのLINEBot SDKを自作した話 しんぶんぶん
自己紹介 • 名前: しんぶんぶん • 所属: 会津大学学部3年 • Twitter: @shinbunbun_,
@4fa19623 • LINE API Expert / seccamp ’23 / Cybozu labyouth 13th ◦ セキュキャン: 分散合意ゼミ(Raft) ◦ ラボユース: CRDTを使ったP2P分散データベースの開発
LINE Messaging APIについて/今回作ったもの • いわゆるLINEBotを作るのに必要な API • 各言語でSDKが公式から提供されて いる •
Rustは公式で提供されていないので 自作してみた • リポジトリ: https://github.com/shinbunbun/line- bot-sdk-rust LINEBot→
実装したもの • 基本的には構造体の型を定義してい く作業 • LINEから送られてくるメッセージと サーバから送信するメッセージそれぞ れの型を、ドキュメントを見ながら地道 に書いた •
いろいろなAPIがあるので、それらの ラッパーを書いた
使用した(主な)Crate • awc ◦ APIを叩くのに使用 • typed-builder ◦ 型レベルビルダーパターンでメッセージの structを構築できるようにした
• thiserror ◦ エラーハンドリングを良い感じにするのに使用
使用イメージ
使用イメージ
SDKを使ったサンプル実装 • Hands-on LINEBOT Rust編 Vol.1 ◦ 技術書典で頒布した本 • リポジトリ
◦ https://github.com/shinbunbun/Hands-on-LINEB OT-Rust-Vol.1
みんなもRustでLINEBot作ろう!