Skip to content

[unfinished, abandoned, needs rebase] Refactor network stack to Axum and Hyper v1#548

Draft
Tokarak wants to merge 53 commits intoredlib-org:mainfrom
Tokarak:pr-axum-refactor
Draft

[unfinished, abandoned, needs rebase] Refactor network stack to Axum and Hyper v1#548
Tokarak wants to merge 53 commits intoredlib-org:mainfrom
Tokarak:pr-axum-refactor

Conversation

@Tokarak
Copy link
Copy Markdown
Contributor

@Tokarak Tokarak commented Apr 8, 2026

More than a year ago I tried to manually migrate the network stack to the Axum library. I never finished. However, what I have started might be able to be completed using a vibecoding tool (either now or in the future). I'm publishing my code in case anybody wants to finish the task. I regret not pushing my changes earlier.

For testing purposes, most of the old networking stack has been left in. I planned to remove it when the migration was complete.

If anybody ever upgrades to Hyper v1, there are some changes here that could be ported, such as using the Cookiejar library (which depends on Hyper v1 under the hood, I think); and the reqwest library for Redlib<->Reddit http interactions.

Related: #46, #395

Tokarak added 30 commits March 18, 2025 02:32
The interaction with the rest of the codebase is a little ugly, but
functionality is practically the same.
Refactor `main::fetch_instances()` and `main::fetch_commit_info()`
Enabled deprecated warnings in hyper crate
Settings encoded_restore was updated
main.rs now temporarily uses map_error to map into strings. Later, the ApiError should be converted into a Response<Body> using the crate's utilities.
Note: current implementation is broken, since the url query isn't
forwarded.
Preparations to port post::item
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