おなじみのコマンド
build、run、test、clean、add、fmt など。謎めいたコマンドの連鎖はありません。
DCR は C と C++ に、モダンで予測しやすいワークフローをもたらします。プロジェクトを一度定義すれば、依存関係を管理し、どこでも同じシンプルなコマンドでビルドできます。
$ dcr new myapp
Creating project `myapp` Created directory `myapp` Created dcr.toml Created src/main.c Initialized git repository Created project `myapp` info: Next steps: cd myapp dcr run
$ cd myapp
$ dcr run
project myapp (debug, x86_64-unknown-linux-gnu) compile myapp v0.1.0 [1/1] done in 0.24s run /home/dexoron/tmp/myapp/target/x86_64-unknown-linux-gnu/debug/myapp Hello World!
$
ビルドに必要なすべてを。1 つのツール。1 つの設定。1 つのワークフロー。
build、run、test、clean、add、fmt など。謎めいたコマンドの連鎖はありません。
ローカルパス、Git リポジトリ、レジストリを利用できます。DCR はロックファイルで依存関係の再現性を保ちます。
プロジェクト設定を書き換えることなく、Linux、Windows、macOS、BSD などのプラットフォームを対象にできます。
compile_commands.json を生成して、VS Code や CLion など、お好みのエディタをそのまま使えます。
ビルド設定は dcr.toml にまとめます。散らばったスクリプトも、設定の発掘作業も不要です。
オフラインでヘルプが必要? man dcr があります。
1 分もかからずに C/C++ プロジェクトを動かしましょう。
標準的なディレクトリ構成のクリーンな C/C++ ワークスペースを作成します。
$ dcr new myapp
Creating project `myapp` Created project `myapp` info: Next steps: cd myapp dcr run
$ cd myapp
人間が読みやすいシンプルな設定。CMake の構文は不要です。
[package] name = "myapp" version = "0.1.0" dcr-version = "0.9.6" [build] language = "c" standard = "c11" compiler = "clang" kind = "bin" [dependencies]
1 つのコマンドで依存関係をコンパイルし、実行ファイルを起動します。
$ dcr run
project myapp (debug, x86_64-unknown-linux-gnu) compile myapp v0.1.0 [1/1] done in 0.24s run /home/user/myapp/target/x86_64-unknown-linux-gnu/debug/myapp Hello World!
カスタムビルドフラグ、Qt / MO の扱い、ベアメタル環境が必要ですか?
ドキュメントを見るビルドの準備はできましたか?
curl -fsSL https://sh.dcr-tool.ru | sh irm https://ps1.dcr-tool.ru | iex curl -fsSL https://sh.dcr-tool.ru | sh yay -S dcr brew tap dexoron/dexoron && brew install dcr nix profile install github:dexoron/dcr cargo install dcr その後:
dcr --version DCR — C/C++ とまともなビルドワークフローをつなぐ、欠けていたピース。