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
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.2k
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
230
オープンソースソフトウェアへの解像度🔬
utam0k
15
2.9k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
160
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
Serena MCPのすすめ
wadakatu
4
1k
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
6
440
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
Swift Concurrency - 状態監視の罠
objectiveaudio
2
520
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
220
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
530
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Designing for humans not robots
tammielis
254
26k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
GraphQLとの向き合い方2022年版
quramy
49
14k
KATA
mclloyd
32
15k
Fireside Chat
paigeccino
40
3.7k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
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作ろう!