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
4k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
260
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
520
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
CSC305 Lecture 02
javiergs
PRO
1
260
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
580
どの様にAIエージェントと 協業すべきだったのか?
takefumiyoshii
2
600
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
0
380
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
330
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
930
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
170
私はどうやって技術力を上げたのか
yusukebe
43
17k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
CSC509 Lecture 02
javiergs
PRO
0
410
プログラミングどうやる? ~テスト駆動開発から学ぶ達人の型~
a_okui
0
190
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
339
57k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Facilitating Awesome Meetings
lara
56
6.6k
The Language of Interfaces
destraynor
162
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
850
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Being A Developer After 40
akosma
91
590k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Bash Introduction
62gerente
615
210k
Building Applications with DynamoDB
mza
96
6.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
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作ろう!