Rust stable #483

Closed
opened 2026-02-20 08:02:44 -05:00 by deekerman · 22 comments
Owner

Originally created by @djmattyg007 on GitHub (Nov 6, 2019).

It would be great to be able to build this with a stable version of rust. Installation of stable rust is a lot more straightforward, and would make it easier to convince Linux distros to include bitwarden_rs in their official repositories.

Originally created by @djmattyg007 on GitHub (Nov 6, 2019). It would be great to be able to build this with a stable version of rust. Installation of stable rust is a lot more straightforward, and would make it easier to convince Linux distros to include bitwarden_rs in their official repositories.
Author
Owner

@mqus commented on GitHub (Nov 6, 2019):

The main reason is probably this: https://github.com/SergioBenitez/Rocket/issues/19
This could be solved by

  1. stabilizing https://github.com/rust-lang/rust/issues/54727
  2. somehow patch rocket to work without the remaining feature
  3. abandoning rocket and using another webserver like actix-web instead.

I'm not involved with writing code in any of these projects(including here) but it seems that all of those options are neither easy nor fast to do, so there is still a way to go before compiling bitwarden_rs with stable rust is possible.

@mqus commented on GitHub (Nov 6, 2019): The main reason is probably this: https://github.com/SergioBenitez/Rocket/issues/19 This could be solved by 1. stabilizing https://github.com/rust-lang/rust/issues/54727 2. somehow patch rocket to work without the remaining feature 3. abandoning rocket and using another webserver like actix-web instead. I'm not involved with writing code in any of these projects(including here) but it seems that all of those options are neither easy nor fast to do, so there is still a way to go before compiling bitwarden_rs with stable rust is possible.
Author
Owner

@BlackDex commented on GitHub (Nov 7, 2019):

The end goal is to have it being able to have it compiled using the stable version.
But indeed the Rocket chain is currently one of the bottlenecks.
And there are also some dependencies, like pear/pear_codegen, which report to need a nightly but probably can use the current v1.38 stable. And some crates and bitwarden_rs it self are using some feature's which aren't in a stable release yet. Not even the v1.38, so we currently are stuck on the nightly release.

@BlackDex commented on GitHub (Nov 7, 2019): The end goal is to have it being able to have it compiled using the stable version. But indeed the Rocket chain is currently one of the bottlenecks. And there are also some dependencies, like pear/pear_codegen, which report to need a nightly but probably can use the current v1.38 stable. And some crates and bitwarden_rs it self are using some feature's which aren't in a stable release yet. Not even the v1.38, so we currently are stuck on the nightly release.
Author
Owner

@djmattyg007 commented on GitHub (Nov 7, 2019):

Thank you everyone for the insight, it's really appreciated!

Does this help at all? https://blog.rust-lang.org/2019/11/07/Rust-1.39.0.html

@djmattyg007 commented on GitHub (Nov 7, 2019): Thank you everyone for the insight, it's really appreciated! Does this help at all? https://blog.rust-lang.org/2019/11/07/Rust-1.39.0.html
Author
Owner

@ghost commented on GitHub (Jul 14, 2020):

Any updates on this? I think Rocket was getting close to stable compatibility but not sure what else still needs nightly. On my platforms I do not have access to docker and prefer to use stable Rust if I can, meaning for the moment I can't really use the project despite wanting to try it out.

@ghost commented on GitHub (Jul 14, 2020): Any updates on this? I think Rocket was getting close to stable compatibility but not sure what else still needs nightly. On my platforms I do not have access to docker and prefer to use stable Rust if I can, meaning for the moment I can't really use the project despite wanting to try it out.
Author
Owner

@dani-garcia commented on GitHub (Jul 14, 2020):

Well the proc-macro hygiene is on track to be stabilized for next Rust release sometime this week, and there are some Span related things in the pear library that are still not stabilized, but those are only to have nicer compile errors, so they might be moved behind a feature gate to make it compile in stable rust, and nightly can be used for nicer errors.

Other than that, I assume the next rocket release will also include the async stuff seeing as it has been merged into master, so it might take a bit longer to iron out all it's issues.

On our side, we have two nightly features enabled, try_trait and ip, but they aren't essential so I'll try to remove them before any Rocket stable release.

Edit: All the unstable features used by bitwarden_rs have been removed, so now it's just waiting for the new versions of rocket and rust.

Edit2: The async branch now compiles on stable! 🎉 This uses an unreleased version of Rocket, and will be merged once Rocket 0.5 is released. https://github.com/dani-garcia/bitwarden_rs/tree/async

@dani-garcia commented on GitHub (Jul 14, 2020): Well the proc-macro hygiene is on track to be stabilized for next Rust release sometime this week, and there are some Span related things in the pear library that are still not stabilized, but those are only to have nicer compile errors, so they might be moved behind a feature gate to make it compile in stable rust, and nightly can be used for nicer errors. Other than that, I assume the next rocket release will also include the async stuff seeing as it has been merged into master, so it might take a bit longer to iron out all it's issues. ~~On our side, we have two nightly features enabled, `try_trait` and `ip`, but they aren't essential so I'll try to remove them before any Rocket stable release.~~ Edit: All the unstable features used by bitwarden_rs have been removed, so now it's just waiting for the new versions of rocket and rust. Edit2: The async branch now compiles on stable! 🎉 This uses an unreleased version of Rocket, and will be merged once Rocket 0.5 is released. https://github.com/dani-garcia/bitwarden_rs/tree/async
Author
Owner

@montdidier commented on GitHub (Jan 7, 2021):

Looking forward to this happening.

@montdidier commented on GitHub (Jan 7, 2021): Looking forward to this happening.
Author
Owner

@hgaiser commented on GitHub (Oct 21, 2021):

I think this issue has been resolved? At least for me it compiles using stable (1.55).

@hgaiser commented on GitHub (Oct 21, 2021): I think this issue has been resolved? At least for me it compiles using stable (1.55).
Author
Owner

@BlackDex commented on GitHub (Oct 21, 2021):

@hgaiser that doesn't work on the main branch, it will fail because some dependencies require nightly (or dev) toolchain.

@BlackDex commented on GitHub (Oct 21, 2021): @hgaiser that doesn't work on the `main` branch, it will fail because some dependencies require nightly (or dev) toolchain.
Author
Owner

@hgaiser commented on GitHub (Oct 21, 2021):

That's what I mean, for me it seems to work on main branch, with --feature sqlite at least. Maybe there are other features with additional dependencies that fail?

@hgaiser commented on GitHub (Oct 21, 2021): That's what I mean, for me it seems to work on `main` branch, with `--feature sqlite` at least. Maybe there are other features with additional dependencies that fail?
Author
Owner

@BlackDex commented on GitHub (Oct 21, 2021):

It can't work with stable at all, not with only sqlite or any other database since the Rocket version/commit which is used in main is using rocket_codegen which needs nightly.

  --- stderr
  Error: Rocket (codegen) requires a 'dev' or 'nightly' version of rustc.
  Installed version: 1.55.0 (2021-09-06)
  Minimum required:  1.33.0-nightly (2019-01-13)
@BlackDex commented on GitHub (Oct 21, 2021): It can't work with stable at all, not with only sqlite or any other database since the Rocket version/commit which is used in `main` is using `rocket_codegen` which needs nightly. ``` --- stderr Error: Rocket (codegen) requires a 'dev' or 'nightly' version of rustc. Installed version: 1.55.0 (2021-09-06) Minimum required: 1.33.0-nightly (2019-01-13) ```
Author
Owner

@hgaiser commented on GitHub (Oct 21, 2021):

Ah I see what happened: there is a nightly toolchain defined in rust-toolchain. I was not aware of that, I am using stable by default but that file caused cargo to use nightly. Apologies for the confusion.

@hgaiser commented on GitHub (Oct 21, 2021): Ah I see what happened: there is a nightly toolchain defined in [`rust-toolchain`](https://github.com/dani-garcia/vaultwarden/blob/main/rust-toolchain). I was not aware of that, I am using stable by default but that file caused `cargo` to use nightly. Apologies for the confusion.
Author
Owner

@remmycat commented on GitHub (Oct 23, 2021):

Hey @dani-garcia, You wrote that

Edit2: The async branch now compiles on stable! 🎉 This uses an unreleased version of Rocket, and will be merged once Rocket 0.5 is released. https://github.com/dani-garcia/bitwarden_rs/tree/async

Would it make sense to try updating Rocket to 0.5.0-rc.1 released in june, and then merging the async branch if everything works out? In the Blog post they are writing "We encourage all users to migrate their applications to the release candidate."

The mentioned plans to release 0.5.0 on "Friday, June 18th" must have not worked out, but I thought maybe it's worth a shot to already try using the RC.

@remmycat commented on GitHub (Oct 23, 2021): Hey @dani-garcia, You wrote that > Edit2: The async branch now compiles on stable! 🎉 This uses an unreleased version of Rocket, and will be merged once Rocket 0.5 is released. https://github.com/dani-garcia/bitwarden_rs/tree/async Would it make sense to try updating Rocket to 0.5.0-rc.1 released in june, and then merging the async branch if everything works out? In the [Blog post](https://rocket.rs/v0.5-rc/news/2021-06-09-version-0.5-rc.1/) they are writing "We encourage all users to migrate their applications to the release candidate." The mentioned plans to release `0.5.0` on "Friday, June 18th" must have not worked out, but I thought maybe it's worth a shot to already try using the RC.
Author
Owner

@BlackDex commented on GitHub (Oct 23, 2021):

We already have an async branch, but it needs some updating to catch-up on main.

@BlackDex commented on GitHub (Oct 23, 2021): We already have an async branch, but it needs some updating to catch-up on main.
Author
Owner

@dani-garcia commented on GitHub (Oct 23, 2021):

I have an unfinished version of the update to the RC on my laptop that needs some database changes to work with async, I'll see if can can finish it sometime soon.

@dani-garcia commented on GitHub (Oct 23, 2021): I have an unfinished version of the update to the RC on my laptop that needs some database changes to work with async, I'll see if can can finish it sometime soon.
Author
Owner

@BlackDex commented on GitHub (Dec 23, 2021):

As an update, there is a new async branch available. And i also have a PR #2143 open with some updates from main, which currently is outdated already, but it is at least something.

@BlackDex commented on GitHub (Dec 23, 2021): As an update, there is a new `async` branch available. And i also have a PR #2143 open with some updates from `main`, which currently is outdated already, but it is at least something.
Author
Owner

@BlackDex commented on GitHub (Feb 27, 2022):

This is now added and enabled via #2276.

@BlackDex commented on GitHub (Feb 27, 2022): This is now added and enabled via #2276.
Author
Owner

@montdidier commented on GitHub (Mar 11, 2022):

Any view on when this might make it into an official release?

@montdidier commented on GitHub (Mar 11, 2022): Any view on when this might make it into an official release?
Author
Owner

@BlackDex commented on GitHub (Mar 11, 2022):

It currently is in the main branch, and you are able to test it by using the testing tagged images.
We probably want to have some time for testing, and fix some bugs before we even release a version using these changes.
Since, they are a lot.

@BlackDex commented on GitHub (Mar 11, 2022): It currently is in the `main` branch, and you are able to test it by using the `testing` tagged images. We probably want to have some time for testing, and fix some bugs before we even release a version using these changes. Since, they are a lot.
Author
Owner

@montdidier commented on GitHub (Mar 13, 2022):

Ok. I will be trying it out this week. Is there is a list of know issues beyond the github issues list?

@montdidier commented on GitHub (Mar 13, 2022): Ok. I will be trying it out this week. Is there is a list of know issues beyond the github issues list?
Author
Owner

@BlackDex commented on GitHub (Mar 14, 2022):

We only have GitHub for issue tracking.

There is a ticket for gathering of issues/features which are open #246
Maybe there are some items on the Discussions page or at our Forum but those arn't tracked then.

Also, if you are talking about specific issues with the new build which is able to build with stable, then until now we have no new reports regarding this. I have been running it for a while now, and didn't encountered any strange issues as of yet.

@BlackDex commented on GitHub (Mar 14, 2022): We only have GitHub for issue tracking. There is a ticket for gathering of issues/features which are open #246 Maybe there are some items on the [Discussions](https://github.com/dani-garcia/vaultwarden/discussions) page or at our [Forum](https://vaultwarden.discourse.group/) but those arn't tracked then. Also, if you are talking about specific issues with the new build which is able to build with stable, then until now we have no new reports regarding this. I have been running it for a while now, and didn't encountered any strange issues as of yet.
Author
Owner

@montdidier commented on GitHub (Mar 14, 2022):

I just realised you mean the docker images. Ok. I'm working towards building the offical alpine package, so I will just make an alpine package build from master then to test it.

@montdidier commented on GitHub (Mar 14, 2022): I just realised you mean the docker images. Ok. I'm working towards building the [offical alpine package](https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/testing/vaultwarden), so I will just make an alpine package build from master then to test it.
Author
Owner

@BlackDex commented on GitHub (Mar 14, 2022):

Yea, the main branch is the one the new version will be using.
Small note on the APKBUILD, i would suggest to remove the abort= statement. That could break the binary, and makes issues harder to debug

@BlackDex commented on GitHub (Mar 14, 2022): Yea, the `main` branch is the one the new version will be using. Small note on the APKBUILD, i would suggest to remove the `abort=` statement. That could break the binary, and makes issues harder to debug
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#483
No description provided.