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.9k
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
320
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.1k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.1k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
260
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
540
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
200
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
1.8k
IEEE802.1X認証を導入してみた
shinbunbun_
0
280
UBICの食材管理APIを作った話
shinbunbun_
0
220
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
520
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
110
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
270
overlayPreferenceValue で実現する ピュア SwiftUI な AdMob ネイティブ広告
uhucream
0
200
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
390
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
600
Six and a half ridiculous things to do with Quarkus
hollycummins
0
200
CSC305 Lecture 10
javiergs
PRO
0
220
CSC509 Lecture 07
javiergs
PRO
0
240
Devoxx BE - Local Development in the AI Era
kdubois
0
130
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
230
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
240
Featured
See All Featured
Become a Pro
speakerdeck
PRO
29
5.6k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
How GitHub (no longer) Works
holman
315
140k
Unsuck your backbone
ammeep
671
58k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Facilitating Awesome Meetings
lara
56
6.6k
4 Signs Your Business is Dying
shpigford
185
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Visualization
eitanlees
149
16k
Code Reviewing Like a Champion
maltzj
526
40k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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作ろう!