Skip to content

A collection of updates and build time flag adjustments#3248

Merged
ellie merged 3 commits intomainfrom
ellie/slim-binary
Mar 9, 2026
Merged

A collection of updates and build time flag adjustments#3248
ellie merged 3 commits intomainfrom
ellie/slim-binary

Conversation

@ellie
Copy link
Member

@ellie ellie commented Mar 9, 2026

The goal here is to reduce the final binary size, and also reduce dependencies that we don't actually need to have included

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR reduces binary size and trims unnecessary dependencies by upgrading axum (0.7→0.8), thiserror (1→2), stripping symbols in the dist profile, and narrowing minijinja's enabled features. The axum upgrade is handled correctly — async-trait is removed, FromRequestParts uses native async, and route parameter syntax is updated to the {param} style.

  • Axum upgraded 0.7→0.8; async-trait removed; route params migrated to {param} syntax
  • minijinja now built with default-features = false, features = ["builtins", "serde"]
  • thiserror bumped to v2
  • strip = "symbols" added to [profile.dist]

Important Files Changed

Filename Overview
Cargo.toml Updates thiserror to v2, disables minijinja default features (keeping builtins + serde), and adds symbol stripping to the dist profile for smaller binaries.
crates/atuin-server/Cargo.toml Drops async-trait dependency and upgrades axum from 0.7 to 0.8, which now natively supports async trait methods.
crates/atuin-server/src/router.rs Removes async_trait macro, updates route parameter syntax from :param to {param} for axum 0.8 compatibility.
Cargo.lock Lock file updated to reflect axum 0.8.8, thiserror 2.0.18, matchit 0.8.4, and removal of axum 0.7 + axum-core 0.4 entries.

Last reviewed commit: aac93ef

ellie added 3 commits March 9, 2026 15:30
Adds strip = "symbols" to the cargo dist profile, removing debug
symbols and symbol tables from the release binary (~5MiB savings).
Our crates used thiserror 1.x while the ratatui ecosystem already
pulled in thiserror 2.x, resulting in both versions in the binary.
The API is compatible; this consolidates to a single version.
atuin-server used axum 0.7 while tonic already pulled in axum 0.8,
resulting in both versions compiled into the binary. Migrates to
axum 0.8: path params use {param} syntax, FromRequestParts uses
native async traits (dropping async-trait dep from atuin-server).
@ellie ellie force-pushed the ellie/slim-binary branch from aac93ef to b0f2b92 Compare March 9, 2026 22:30
@ellie ellie merged commit 84f1867 into main Mar 9, 2026
22 checks passed
@ellie ellie deleted the ellie/slim-binary branch March 9, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant