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
0
1.2k
RustのLINEBot SDKを自作した話
Yuto Takamune
September 29, 2023
Tweet
Share
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
0
270
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
3.1k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
2.9k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
200
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
410
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
170
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
1.1k
IEEE802.1X認証を導入してみた
shinbunbun_
0
230
UBICの食材管理APIを作った話
shinbunbun_
0
190
Other Decks in Programming
See All in Programming
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
4.9k
Rubyでつくるパケットキャプチャツール
ydah
1
710
SRE、開発、QAが協業して挑んだリリースプロセス改革@SRE Kaigi 2025
nealle
3
4k
ErdMap: Thinking about a map for Rails applications
makicamel
1
1.4k
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
210
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
420
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
4.2k
Spring gRPC について / About Spring gRPC
mackey0225
0
210
Lottieアニメーションをカスタマイズしてみた
tahia910
0
110
SpringBoot3.4の構造化ログ #kanjava
irof
2
910
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
160
自動で //nolint を挿入する取り組み / Gopher's Gathering
utgwkk
1
220
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
BBQ
matthewcrist
86
9.4k
A better future with KSS
kneath
238
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
620
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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作ろう!