From ece17cea77177b9fa9fa4b08ed6944ac0c1a68b3 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Sat, 28 Jun 2025 22:33:53 +0200 Subject: [PATCH] Optimize release build --- .vscode/launch.json | 56 --------------------------------------------- Cargo.toml | 15 +++++++++++- 2 files changed, 14 insertions(+), 57 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 922894d..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'batch_downloader'", - "cargo": { - "args": [ - "build", - "--bin=batch_downloader", - "--package=batch_downloader" - ], - "filter": { - "name": "batch_downloader", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}", - "env": { - "API_KEY": "debug", - "MINIO_HOST": "minio.kurbezz.ru:9000", - "MINIO_BUCKET": "book.archives", - "MINIO_ACCESS_KEY": "SAYRdiuaMvc3gjtxGZRm", - "MINIO_SECRET_KEY": "MUwBZs80J8rzKKJvp9Iv4tLBfyxakH7MkrgHiWc1", - "LIBRARY_API_KEY": "v3TGJxquSX8qg42EdeatASJddrSDcPdK", - "LIBRARY_URL": "https://book-library.kurbezz.ru", - "CACHE_API_KEY": "kGaA6feem7Nz5ZuRQDp6L8pdwEdnCAKH", - "CACHE_URL": "https://book-channel-cache.kurbezz.ru", - } - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'batch_downloader'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=batch_downloader", - "--package=batch_downloader" - ], - "filter": { - "name": "batch_downloader", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 2f99773..ad1957a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,20 @@ name = "batch_downloader" version = "0.1.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[profile.release] +opt-level = 3 +debug = false +strip = true +lto = true +codegen-units = 1 +panic = 'abort' + +[profile.profiling] +inherits = "release" +debug = true +strip = false + [dependencies] tokio = { version = "1.44.1", features = ["full"] }