Conversation
Owner
Author
|
The migration to Axum is now complete, and the authorization handling has now been improved through the use of custom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR migrates all of Alexandrie's codebase to use:
axuminstead oftideas its web frameworktokioinstead ofasync-stdas its main async runtimetracinginstead ofslogas the logging mechanismtoweras the mean to implement middlewares (called layers)which also implies that we now use:
httpinstead ofhttp-typesas its HTTP type definitionshyperinstead ofasync-h1as its HTTP parser implementationThis move allows to remove some async runtime duplication that was existing in Alexandrie due to its use of libraries that always assumed to be running a
tokioruntime (likerusotofor interactions with S3).Although I still find
tideto be a very nice web framework, its reliance onasync-stdmakes it a bit annoying to work with and can prevent integrations with other library integrations (like middlewares or frontend frameworks likeleptoswhich I am considering using as a replacement forhandlebarstemplating and flash session data especially for pages with rich interactions like the account management page).The primary goal of this PR is to keep everything working just like before, and therefore is pretty much a 1-to-1 translation from the old to the new framework.
This means that there may be things that may be significantly improved by using more advanced features of the
axumframework, like handling the authentication using theAuthorizationheader in the API, which is implemented a bit naively here.These improvements will come in subsequent PRs.
Closes #159.