From 72039965881dd1358beea10a00d28a8a4ec7f514 Mon Sep 17 00:00:00 2001 From: Dexoron Date: Mon, 6 Jul 2026 02:21:28 +0800 Subject: [PATCH] New translations library-project.mdx (Russian) [ci skip] --- .../docs/recipes/library-project.mdx.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs-crowdin-export/ru-RU/docs/recipes/library-project.mdx.mdx b/docs-crowdin-export/ru-RU/docs/recipes/library-project.mdx.mdx index 336c122..db31aaa 100644 --- a/docs-crowdin-export/ru-RU/docs/recipes/library-project.mdx.mdx +++ b/docs-crowdin-export/ru-RU/docs/recipes/library-project.mdx.mdx @@ -1,16 +1,15 @@ --- -sidebar_label: Library project +sidebar_label: Проект библиотеки --- -# Library Project +# Проект библиотеки -Creating a static library and using it in another project. +Создание статической библиотеки и её использование в другом проекте. -## Step 1: Create the library +## Шаг 1: Создать библиотеку ```bash dcr new my-lib -cd my-lib ``` `dcr.toml`: @@ -19,11 +18,11 @@ cd my-lib [package] name = "my-lib" version = "0.1.0" -type = "none" +type = "lib" [build] language = "c" -standard = "c11" +standard = "c17" kind = "staticlib" ``` @@ -43,28 +42,29 @@ int add(int a, int b); int add(int a, int b) { return a + b; } ``` -## Step 2: Build +## Шаг 2: Собрать ```bash +cd my-lib dcr build --release ``` -Artifacts: +Артефакты: -* `target/\/release/libmy-lib.a` (Linux) +* `target/release/libmy-lib.a` (Linux/macOS) * `target/release/my-lib.lib` (Windows) -* `target/include/` — header files +* `target/include/` — заголовочные файлы -## Step 3: Use in another project +## Шаг 3: Использовать в проекте ```bash dcr new my-app cd my-app -dcr add my-lib ../my-lib +dcr add ../my-lib ``` -Automatically: +Автоматически: -* Adds include path to `target/include/` of the library -* Adds lib path to `target/\/release/` -* Links `libmy-lib.a` / `my-lib.lib` +* Добавляется include path на `target/include/` библиотеки +* Добавляется lib path на `target/release/` +* Линкуется `libmy-lib.a` / `my-lib.lib`