Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cargo-makeを使ってみた
Search
Ryosuke Kamesawa
November 19, 2019
Programming
610
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cargo-makeを使ってみた
RustのビルドツールCargoを拡張するタスクランナーCargo-makeの紹介と使ってみた感想を話します。
Ryosuke Kamesawa
November 19, 2019
More Decks by Ryosuke Kamesawa
See All by Ryosuke Kamesawa
推論エンジンMAXの紹介
emakryo
1
650
ニューラルネットワークの量子化手法の紹介
emakryo
3
3.8k
MediaPipeの紹介
emakryo
0
130
Customizing Cargo for Cross Compiling
emakryo
0
58
Feature Store in DRIVE CHART
emakryo
0
110
Feature StoreをRustで実装した話
emakryo
0
67
なぜRustか?
emakryo
0
92
rustdef: Rust on Jupyter Notebook
emakryo
0
73
Machine Learning on Graph Data @ICML2019
emakryo
0
69
Other Decks in Programming
See All in Programming
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
300
Foundry Localでエージェント開発
seosoft
0
180
Deep dive into the select statement (GopherCon UK)
jespino
0
170
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
320
新卒PdEのリアル
ryu1013
1
490
XHTMLが残したもの
yosuke_furukawa
PRO
2
700
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
240
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
260
自分的「カンファレンスの楽しみ方」
syumai
0
200
Jetpack Compose メカニズム
skydoves
0
110
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
Featured
See All Featured
Optimizing for Happiness
mojombo
378
71k
Become a Pro
speakerdeck
PRO
31
6.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
A better future with KSS
kneath
240
18k
Transcript
cargo-makeを 使ってみた話 Ryosuke Kamesawa
自己紹介 - 亀澤諒亮, Ryosuke Kamesawa - Twitter: @cruelturtle - 仕事でrustを触り始めた
- 10月〜 - 競プロ・機械学習
Build tool 何使ってます?
Cargo https://doc.rust-lang.org/cargo/
GNU make https://www.gnu.org/graphics/heckert_gnu.html
Build tools - Cargo - Rust標準 - ビルド作業は一通りできる - lint,
compile, link, test, ..etc - GNU Make - 言語に縛られないビルドツールのデファクト - 大抵なんでもできる - 目的のファイルの生成 - PHONYターゲット
Cargo + Make? - Rust projectでも簡単に複雑なタスクを実行したい - makeでいうPHONYターゲット - e.g.
- 自動生成されたコードのclean - CIとして実行される一連のタスク - Cargoがあるのにmakeを使うのも…
Cargo-make???
cargo-make https://sagiegurari.github.io/cargo-make/ Rust task runner and build tool. - Rustに特化したタスクランナー
- Makefile.toml - 様々なタスクの書き方 - Shell command - Shell script - Rust - etc…
Makefile.toml [tasks.all] dependencies = [ "clippy", "test", "reformat", ] [tasks.reformat]
script = ["cargo fmt -- --emit files"]
ここが便利 - Predefined tasks - CIがラク - clippy, coverage, doc,
… - これだけでそれっぽいタスクが走る $ cargo make ci-flow - 自動インストール - e.g. cargo-audit, cargo-tarpaulin, kcov, …
その他の機能 - Profile - 環境変数の切り替え - Platform override - Linux,
Mac, Windowsで切り替え - Conditional execution - Profile, 環境変数等による条件実行 - Watch changes - ファイルの変更を検知して実行 - etc...
ハマりポイント - Predefined task - 意図せずpredefined taskに上書かれてしまう - Dependencies -
(基本的に)上から順に実行 - 依存しているタスクの中で さらに依存関係がある場合は要注意 - Workspaces - デフォルトではworkspaceごとに 別のタスクとして実行される
欠点 - Timestampに応じたビルドはできない - rustのビルドはあくまでcargoの仕事 - Contributeしましょう!(自分でやれ
最後に - 深入りしすぎなければ便利 - cargo-make 是非使ってみてください - 他にいいツールがあったら教えてください