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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuto Takamune
September 29, 2023
Programming
0
2.1k
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_
1
360
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.4k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.5k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
290
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
610
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
220
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2k
IEEE802.1X認証を導入してみた
shinbunbun_
0
310
UBICの食材管理APIを作った話
shinbunbun_
0
240
Other Decks in Programming
See All in Programming
AI巻き込み型コードレビューのススメ
nealle
2
2.2k
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
260
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
1k
あなたはユーザーではない #PdENight
kajitack
4
200
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
140
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.5k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
330
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
160
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
110
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
180
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
180
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
130
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
94
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
78
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
360
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
460
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
200
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
840
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作ろう!