Skip to content

Conversation

@Xuanwo
Copy link
Collaborator

@Xuanwo Xuanwo commented Oct 16, 2025

Close #2234

This PR adds an Axum implementation for the dist server. We introduced this as a new feature called dist-server-axum with no functional changes to the existing server. This allows our community to test the new server as an experimental option.

All behavior remains identical, and all configurations are unchanged. You can run this server exactly as before by simply replacing the binary.

We welcome your feedback and trials. This is just the first step toward modernizing sccache, with the goal of making it a fully async, modular, and easier-to-maintain project.


This PR was primarily authored with Amp using Claude-Sonnet-4.5 and then hand-reviewed by me. I AM responsible for every change made in this PR. I aimed to keep it aligned with our goals, though I may have missed minor issues. Please flag anything that feels off, I'll fix it quickly.

@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 29.42416% with 1005 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.72%. Comparing base (1e2f32a) to head (8a5dd2f).

Files with missing lines Patch % Lines
src/dist/http_axum/scheduler.rs 0.00% 332 Missing ⚠️
src/dist/http_axum/server.rs 0.00% 320 Missing ⚠️
src/dist/http_axum/streaming.rs 0.00% 82 Missing ⚠️
src/dist/http_axum/extractors.rs 21.95% 64 Missing ⚠️
src/dist/http_axum/auth.rs 41.17% 60 Missing ⚠️
src/bin/sccache-dist/main.rs 0.00% 45 Missing ⚠️
tests/dist_axum_compat.rs 78.35% 42 Missing ⚠️
src/dist/http_axum/tls.rs 73.48% 35 Missing ⚠️
src/dist/http_axum/tests.rs 81.48% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2464      +/-   ##
==========================================
- Coverage   71.22%   69.72%   -1.50%     
==========================================
  Files          64       72       +8     
  Lines       35221    36625    +1404     
==========================================
+ Hits        25087    25538     +451     
- Misses      10134    11087     +953     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Xuanwo <[email protected]>
@Xuanwo Xuanwo requested a review from sylvestre October 16, 2025 15:42
Xuanwo added 11 commits October 16, 2025 23:45
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
@sylvestre sylvestre requested review from glandium and lissyx October 17, 2025 06:08
@sylvestre
Copy link
Collaborator

did you evaluate any of the wins here ? thanks

@Xuanwo
Copy link
Collaborator Author

Xuanwo commented Oct 27, 2025

did you evaluate any of the wins here ? thanks

The ultimate goal is to remove the dying rouille and turn sccache into a true async server.

After the whole refactor been done, we can expected:

  • better performance (async io / async http server)
  • easier maintenance (use up-to-date crates and remove old ones)
  • prevent CVEs (avoid depending on unmaintained crate)

We haven't discussed the full plan yet, but I expect the axum impl will become the default after several versions and finally we'll remove the rouille impl.

@sylvestre
Copy link
Collaborator

ok, thanks
did you run some benchmarks ?

@Xuanwo
Copy link
Collaborator Author

Xuanwo commented Oct 27, 2025

did you run some benchmarks ?

Sorry, I didn’t. I’m working on macOS now and don’t have access to a Linux server. I wish we could get some feedback from the community.

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.

Replace rouille with axum

4 participants