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
700
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
210
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
2.3k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
2.1k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
150
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
240
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
140
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
600
IEEE802.1X認証を導入してみた
shinbunbun_
0
180
UBICの食材管理APIを作った話
shinbunbun_
0
170
Other Decks in Programming
See All in Programming
Harnessing Large Language Models for Training-free Video Anomaly Detection
tereka114
1
1.3k
英語
s_shimotori
1
220
Google's Recipe for Scaling (Web) Security – LocoMocoSec 2024
lweichselbaum
0
170
DDDを志して3年経ったら「DDDの皮を被ったクリーンアーキテクチャ」になった話【デブサミ2024夏】
texmeijin
1
620
わかりやすい正解を捨てて、コトに向き合う - スクラムフェス金沢2024 スポンサーセッション
yusukekokubo
0
170
Advanced App Shrinking Techniques
cbeyls
2
150
Product Management LT会_クアンド新家
shinshin
0
250
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
CSC307 Lecture 11
javiergs
PRO
0
240
CSC307 Lecture 14
javiergs
PRO
0
220
Introduction of Happy Eyeballs Version 2 (RFC8305) to the Socket library
coe401_
1
220
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
276
34k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Building Applications with DynamoDB
mza
89
5.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
36
9.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
Leading Effective Engineering Teams 2024
addyosmani
3
300
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
Web Components: a chance to create the future
zenorocha
307
41k
Happy Clients
brianwarren
94
6.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
189
16k
RailsConf 2023
tenderlove
16
720
The Brand Is Dead. Long Live the Brand.
mthomps
52
36k
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作ろう!