From 54f5f78e2c1d0d390d834560667f60bdc6f35199 Mon Sep 17 00:00:00 2001 From: Dexoron Date: Tue, 7 Jul 2026 11:21:36 +0800 Subject: [PATCH] New translations multi-package-workspace.mdx (Russian) [ci skip] --- .../recipes/multi-package-workspace.mdx.mdx | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs-crowdin-export/ru-RU/docs/recipes/multi-package-workspace.mdx.mdx diff --git a/docs-crowdin-export/ru-RU/docs/recipes/multi-package-workspace.mdx.mdx b/docs-crowdin-export/ru-RU/docs/recipes/multi-package-workspace.mdx.mdx new file mode 100644 index 0000000..f8e8a90 --- /dev/null +++ b/docs-crowdin-export/ru-RU/docs/recipes/multi-package-workspace.mdx.mdx @@ -0,0 +1,102 @@ +--- +sidebar_label: Multi-package workspace +--- + +# Multi-Package Workspace + +A project with three packages: two libraries and a binary. + +## Structure + +``` +workspace/ +├── dcr.toml # root workspace +├── lib-core/ +│ ├── dcr.toml +│ └── src/core.c +├── lib-utils/ +│ ├── dcr.toml +│ └── src/utils.c +└── app/ + ├── dcr.toml + └── src/main.c +``` + +## Root dcr.toml + +```toml +[package] +name = "my-workspace" +version = "0.1.0" +type = "none" + +[build] +inherit = true +language = "c" +standard = "c11" + +[workspace.lib-core] +path = "lib-core" + +[workspace.lib-utils] +path = "lib-utils" +deps = ["lib-core"] + +[workspace.app] +path = "app" +deps = ["lib-core", "lib-utils"] +main = true +``` + +## Packages + +`lib-core/dcr.toml`: + +```toml +[package] +name = "lib-core" +version = "0.1.0" +type = "none" + +[build] +kind = "staticlib" +``` + +`lib-utils/dcr.toml`: + +```toml +[package] +name = "lib-utils" +version = "0.1.0" +type = "none" + +[build] +kind = "staticlib" +``` + +`app/dcr.toml`: + +```toml +[package] +name = "app" +version = "0.1.0" +type = "none" + +[build] +kind = "bin" +``` + +## Build + +```bash +cd workspace +dcr build # builds everything in correct order +dcr build --workspace app # only app (lib-core and lib-utils built as deps) +dcr run # builds and runs main package +``` + +Build order (topological sort): + +1. `lib-core` +2. `lib-utils` (depends on lib-core) +3. `app` (depends on lib-core, lib-utils)