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

Rust stable #712

Closed
djmattyg007 opened this issue Nov 6, 2019 · 22 comments
Closed

Rust stable #712

djmattyg007 opened this issue Nov 6, 2019 · 22 comments
Labels
enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided Third party Needs an update from the third party library

Comments

@djmattyg007
Copy link

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.

@mqus
Copy link
Contributor

mqus commented Nov 7, 2019

The main reason is probably this: rwf2/Rocket#19
This could be solved by

  1. stabilizing Tracking issue for procedural macros and "hygiene 2.0" rust-lang/rust#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.

@BlackDex
Copy link
Collaborator

BlackDex commented 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.

@djmattyg007
Copy link
Author

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

@ghost
Copy link

ghost commented 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.

@dani-garcia
Copy link
Owner

dani-garcia commented 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

@BlackDex BlackDex added enhancement New feature or request Third party Needs an update from the third party library labels Oct 3, 2020
@BlackDex BlackDex added the low priority Won't fix anytime soon, but will accept PR if provided label Nov 18, 2020
@montdidier
Copy link

Looking forward to this happening.

@hgaiser
Copy link

hgaiser commented Oct 21, 2021

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

@BlackDex
Copy link
Collaborator

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

@hgaiser
Copy link

hgaiser commented 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?

@BlackDex
Copy link
Collaborator

BlackDex commented 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)

@hgaiser
Copy link

hgaiser commented 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.

@remmycat
Copy link

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.

@BlackDex
Copy link
Collaborator

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

@dani-garcia
Copy link
Owner

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.

@BlackDex
Copy link
Collaborator

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
Copy link
Collaborator

This is now added and enabled via #2276.

@montdidier
Copy link

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

@BlackDex
Copy link
Collaborator

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.

@montdidier
Copy link

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

@BlackDex
Copy link
Collaborator

BlackDex commented 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.

@montdidier
Copy link

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.

@BlackDex
Copy link
Collaborator

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided Third party Needs an update from the third party library
Projects
None yet
Development

No branches or pull requests

7 participants