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
Cargo-makeを使ってみた
Search
Ryosuke Kamesawa
November 19, 2019
Programming
570
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
620
ニューラルネットワークの量子化手法の紹介
emakryo
3
3.7k
MediaPipeの紹介
emakryo
0
120
Customizing Cargo for Cross Compiling
emakryo
0
50
Feature Store in DRIVE CHART
emakryo
0
89
Feature StoreをRustで実装した話
emakryo
0
62
なぜRustか?
emakryo
0
81
rustdef: Rust on Jupyter Notebook
emakryo
0
66
Machine Learning on Graph Data @ICML2019
emakryo
0
66
Other Decks in Programming
See All in Programming
Creating Composable Callables in Contemporary C++
rollbear
0
140
Contextとはなにか
chiroruxx
1
330
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
140
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
180
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
790
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
160
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.1k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
Oxcを導入して開発体験が向上した話
yug1224
4
320
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
690
Featured
See All Featured
BBQ
matthewcrist
89
10k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
A Soul's Torment
seathinner
6
2.9k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
WENDY [Excerpt]
tessaabrams
11
38k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Producing Creativity
orderedlist
PRO
348
40k
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 是非使ってみてください - 他にいいツールがあったら教えてください