mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #1078] can't compile on arm board in good conditions #764
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#764
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @changemenemo on GitHub (Aug 1, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1078
Hi,
I will modify this post if requested but it's pretty simple.
We have some problems to compile your package with the rust compiler on arm board like used for https://labriqueinter.net/
which is based on yunohost.
the rust is too heavy to be able to compile the whole thing in one long thread. So I wanted to know if it was possible to divide the work into several small ones. Like other app based on node.js. It would release RAM and swap back and forth as the process go forward.
I've made a feature request a few days ago but apparently this has been deleted ?
Thanksi n advance to give my some feedback on it.
@dani-garcia commented on GitHub (Aug 4, 2020):
By heavy you mean it uses too much RAM and runs out of memory? If so I don't think there's too much we can do, you can try building with
cargo build -j 1to reduce the number of parallel jobs to 1, but that might still not be enough.The other option would be to have a big swap but that would make the compile time considerably longer.
To be honest compiling rust code in weak arm boards is usually a bad idea, it's easier to cross compile it from some beefier x86 machine.
@changemenemo commented on GitHub (Aug 5, 2020):
yup runs out of RAM and swap which is 1G of RAM 4G of swap.
your compilation process seems, in opposition to a compiling job with node, to build up in RAM as I said in place of releasing after each module that has been compiled, am I correct here?
@changemenemo commented on GitHub (Aug 6, 2020):
@dani-garcia and if it's a bad idea to do it on a arm board, wouldn't be possible to per-compile it for specific platform? And so deliver some pre compiled packages to the specified platform?
I'm sorry, I'm going to try to stay logic on a higher level here and being stucked into a programming-level discussion since we are discussing about user-usability and experience.
Is this web app-endpoint, needing that much of ressources and modules ? I mean that I have been able to compile something like Jupiterlab which is supposed to be able to do way much more things than bitwarden which is(sorry for this word) 'just' a password manager. Or for nextcloud same debate for example.
@mqus commented on GitHub (Aug 12, 2020):
I think that you can cross-compile bitwarden_rs on your desktop pc by choosing a different target with
cargo --target=. I just googled it and e.g. https://sigmaris.info/blog/2019/02/cross-compiling-rust-on-mac-os-for-an-arm-linux-router/ could work. Once you have compiled the binary you can copy it on your target machine(s), setup the configuration and everything else.But as you mention the runtime experience: Once you have compiled the binary, you really only need that binary and it runs fast on pretty much any hardware. The binary itself is ~20MB big, which should fit easily on any SBC storage. It also uses about 32mb of RAM.
It really is only the compile process that takes this much computation power, but I have to add my own datapoint: I'm regularly compiling bitwarden_rs on a raspberry pi 3b (armv7h(8h?), 4 cores, 1gb RAM) and while I have to enable swap for building the vault, building bitwarden_rs itself didn't need it. But I do have to wait ~2.5 hours to let it compile.
@rkojedzinszky commented on GitHub (Aug 30, 2020):
I am building my images on arm with 2G ram, the process takes nearly two hours. The multiarch multidb images are available here: https://hub.docker.com/r/rkojedzinszky/bitwardenrs-server
@changemenemo commented on GitHub (Aug 31, 2020):
Thanks this is what you are using ? I m using yunohost installation process but I could use docker too.
The arm board is an olimex lime2 here so 1G of RAM and several G oof swap
@rkojedzinszky commented on GitHub (Aug 31, 2020):
I am building this on an orange pi plus 2e. It has 2gigs of ram, without any swap. I am building it with drone.io in k8s.
--
Ezt a levelet az Android készülékemről küldtem K-9 Mail-el. Elnézést a tömörségemért.
@changemenemo commented on GitHub (Sep 1, 2020):
Ooow so with kubernetes, yeah that's a bit different then. I can understand that I t could work that way. Thanks for the tip anyway
@rkojedzinszky commented on GitHub (Sep 1, 2020):
I think that is irrelevant that I compile it with some ci-cd pipeline. The point is that on a PI with 2G ram it can be compiled.
@BlackDex commented on GitHub (Nov 18, 2020):
I will close this ticket as this is not something we can fix on our side.
Please feel free to continue this discussion on the forum: https://bitwardenrs.discourse.group/