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
110
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
170
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
1.2k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
980
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
130
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
190
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
140
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
25
IEEE802.1X認証を導入してみた
shinbunbun_
0
170
UBICの食材管理APIを作った話
shinbunbun_
0
160
Other Decks in Programming
See All in Programming
slog登場に伴うloggerの取り回し手法の見直し / kamakura.go #6
arthur1
0
120
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
180
一文字エイリアスのすすめ
fujimura
0
190
Documentation testsの恩恵 / Documentation testing benefits
ssssota
1
560
Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit
marcoroth
3
610
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
220
Adding Security to Microcontroller Ruby
sylph01
1
160
哲学史とモデリング
tanakahisateru
2
420
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
510
ペパボOpenTelemetry革命
pyama86
2
940
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
610
Open AI APIを使う前に知っておきたいアカウントTier の話
akki_megane
0
130
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
125
8.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
GraphQLの誤解/rethinking-graphql
sonatard
56
9.3k
Building Applications with DynamoDB
mza
88
5.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
8
3.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
21
1.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
The Language of Interfaces
destraynor
151
23k
Infographics Made Easy
chrislema
238
18k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.7k
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作ろう!