ssh-portfolio/Cargo.toml
Erica Marigold 019af6bb36
build: apply optimizations in release mode
TODO: Potentially highlight more performance hotspots with
`#[optimize(speed)]`.
2025-08-27 12:46:23 +01:00

111 lines
3.7 KiB
TOML

[package]
name = "ssh-portfolio"
version = "0.1.0"
edition = "2021"
description = "no"
repository = "https://git.devcomp.xyz/DevComp/ssh-portfolio"
authors = ["Erica Marigold <hi@devcomp.xyz>"]
build = "build.rs"
# Taken from https://github.com/microsoft/edit/blob/a3a6f5f/Cargo.toml#L20-L31
# We use `opt-level = "s"` as it significantly reduces binary size.
# We could then use the `#[optimize(speed)]` attribute for spot optimizations.
# Unfortunately, that attribute currently doesn't work on intrinsics such as memset.
[profile.release]
codegen-units = 1 # Reduces binary size by ~2%
debug = "full" # No one needs an undebuggable release binary
lto = true # Reduces binary size by ~14%
opt-level = "s" # Reduces binary size by ~25%
split-debuginfo = "packed" # Generates a separate *.dwp/*.dSYM so the binary can get stripped
strip = "symbols" # See split-debuginfo - allows us to drop the size by ~65%
[profile.dev]
opt-level = 2 # Optimize more than default, see https://github.com/RustCrypto/RSA/issues/144
incremental = true # Improves re-compile times
[features]
default = ["blog"]
blog = [
# Main deps
"dep:atrium-api",
"dep:atrium-xrpc",
"dep:atrium-xrpc-client",
"dep:atrium-common",
"dep:reqwest",
"dep:ipld-core",
"dep:tui-markdown",
"dep:chrono",
"dep:ratatui-image",
"dep:image",
# Build deps
"dep:atrium-codegen",
"dep:patch-crate"
]
[package.metadata.patch]
crates = ["ratatui-image"]
[patch.crates-io]
ratatui-image = { path = "./target/patch/ratatui-image-8.0.1" }
[dependencies]
actix-web = "4.11.0"
anyhow = "1.0.90"
async-trait = "0.1.85"
atrium-api = { version = "0.25.4", optional = true }
atrium-common = { version = "0.1.2", optional = true }
atrium-xrpc = { version = "0.12.3", optional = true }
atrium-xrpc-client = { version = "0.5.14", optional = true, default-features = false, features = ["reqwest"] }
better-panic = "0.3.0"
bstr = "1.11.3"
chrono = { version = "0.4.41", optional = true }
clap = { version = "4.5.20", features = [
"derive",
"cargo",
"wrap_help",
"unicode",
"string",
"unstable-styles",
] }
color-eyre = "0.6.3"
config = "0.15.14"
crossterm = { version = "0.28.1", features = ["serde", "event-stream"] }
default_variant = "0.1.0"
derive_deref = "1.1.1"
directories = "5.0.1"
figlet-rs = "0.1.5"
futures = "0.3.31"
human-panic = "2.0.2"
image = { version = "0.25.6", optional = true }
indoc = "2.0.5"
ipld-core = { version = "0.4.2", optional = true }
json5 = "0.4.1"
lazy_static = "1.5.0"
libc = "0.2.161"
mime_guess = "2.0.5"
pretty_assertions = "1.4.1"
ratatui = { version = "0.29.0", features = ["serde", "macros"] }
ratatui-image = { version = "8.0.1", optional = true }
reqwest = { version = "0.12", optional = true, default-features = false, features = ["charset", "http2", "rustls-tls"] }
russh = "0.49.2"
rust-embed = { version = "8.7.2", features = ["actix"] }
serde = { version = "1.0.211", features = ["derive"] }
serde_json = "1.0.132"
ssh-key = { version = "0.6.7", features = ["getrandom", "crypto"] }
signal-hook = "0.3.17"
strip-ansi-escapes = "0.2.0"
strum = { version = "0.26.3", features = ["derive"] }
tokio = { version = "1.40.0", features = ["full"] }
tokio-util = "0.7.12"
tracing = "0.1.40"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "serde"] }
tui-markdown = { version = "0.3.5", optional = true }
shellexpand = "3.1.1"
[build-dependencies]
anyhow = "1.0.90"
atrium-codegen = { git = "https://github.com/atrium-rs/atrium.git", rev = "ccc0213", optional = true }
patch-crate = { version = "0.1.13", optional = true }
vergen-gix = { version = "1.0.2", features = ["build", "cargo"] }