Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rocket to 0.5 and async, and compile on stable #2276

Merged
merged 6 commits into from Feb 27, 2022
Merged

Conversation

dani-garcia
Copy link
Owner

Rebased on top of the latest changes in main.

Seeing as there is no release of a final Rocket 0.5 in the near future, I think it's time to consider merging this as it's a big patch and hard to keep in sync.

There shouldn't be any major breaking changes, but Rocket 0.5 brings a new configuration system so that might break things for users depending on them. That said, the ones in use by most people (ROCKET_ADDRESS, ROCKET_PORT and ROCKET_TLS) are the same as before. ROCKET_ENV has changed to ROCKET_PROFILE, so anyone using that must update their config.

The file uploads are now also handled by rocket directly, and uploaded to a configurable temp directory first, before being moved to the attachments or sends folder. We should document that the temp directory and the attachments and sends folder must be in the same partition/mount point, otherwise the file move will fail.

Also I just noticed that I'm hardcoding the listen address to 0.0.0.0, I will change that before pushing.

Pending changes:

  • Remove hardcoded listen address from main()
  • Remove ROCKET_ENV from docker images if still present, make sure the listen address is set to 0.0.0.0 and the port is set correctly
  • Check if the default address and port config when running the binary directly are the same, otherwise handle that in code to avoid breaking any builds depending on the default values.

dani-garcia and others added 6 commits January 30, 2022 22:25
This is a rather large PR which updates the async branch to have all the
database methods as an async fn.

Some iter/map logic needed to be changed to a stream::iter().then(), but
besides that most changes were just adding async/await where needed.
- Updated crates
- Fixed Dockerfiles to build using the rust stable version
- Enabled warnings for rust 2018 idioms and fixed them.
@dani-garcia dani-garcia merged commit d781981 into main Feb 27, 2022
@BlackDex BlackDex mentioned this pull request Feb 27, 2022
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.

None yet

2 participants