Live data from Hacker News

Bitwarden compatible server written in Rust

github.com

81–90 of 116 posts

Re: Bitwarden compatible server written in Rust

#81
post #43

Earlier quoted context omitted.

I personally don’t see the appeal of Go. With Rust, I can write a concurrent, safe, and C-performant program with modern programming features like matches, generic programming, and a dedicated package manager (never understood go get). To boot, Rust has a strong ecosystem and the fastest web framework out there (Actix). It takes roughly the same amount of code to do networking stuff in Rust and Go, but with Rust it i…

Good to know! I've been looking at Go because it's "smaller, lighter, faster" than C# but from this description Rust might be a better next language to learn. Thank you!

learn both. golang is vastly more productive than rust for me. better tooling, faster build times, smaller less complex language.

rust is fantastic for building highly performant safe code at the expense of developer productivity. builds times are atrocious and tooling isn't as polished as golang.

both at great languages.

Re: Bitwarden compatible server written in Rust

#82
post #33

I love this, it's how I run my password manager (Using docker-compose and traefik for the ui). Bitwarden works very well in iOS and Android and on Windows10 and in Firefox. Syncs are always instant, I used to use KeePassXC with NextCloud but inevitably I'd have syncing issues (admittedly, not very often). Not anymore. I still have to dig into the Organization feature to share passwords with my partner.

> Syncs are always instant, I used to use KeePassXC with NextCloud but inevitably I'd have syncing issues (admittedly, not very often).

I uses KeepassXC with OneDrive without syncing issue. I set OneDrive on all on my devices to keep the KDBX file locally and sync it from the cloud if there is any change. Only syncing issue I have is with Dropbox, moved to OneDrive and never have issues with keeping it synced so far. If OneDrive went down, the KDBX file will be there because it is set to keep the file locally.

Re: Bitwarden compatible server written in Rust

#83
post #11
post #7

I’ve been really diving into Rust over this holiday break and reading through code bases like this is really helpful. Little things like a shared db connection are not intuitive on the first pass when everything is under such a strict borrow/move/release paradigm. I’m going to study this a little closer but it still isn’t super clear to me. In other languages I would probably implement a singleton of some sort. I kno…

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

.NET isn't slower than golang, and in fact, can be faster.

Re: Bitwarden compatible server written in Rust

#84
post #74

Earlier quoted context omitted.

I personally don’t see the appeal of Go. With Rust, I can write a concurrent, safe, and C-performant program with modern programming features like matches, generic programming, and a dedicated package manager (never understood go get). To boot, Rust has a strong ecosystem and the fastest web framework out there (Actix). It takes roughly the same amount of code to do networking stuff in Rust and Go, but with Rust it i…

You choose golang because you basically want java with less memory usage and static single binary deploys for your backend server applications. Go was designed to be a language that development scales very well with it's focus on simplicity and very fast compile speed. Rust on the other hand, was designed to make certain hard things less hard, at the cost of complexity, ease of learning, speed of development (high am…

Java is way more expressive and better designed than golang. So no, golang is not Java with less memory. It's also possible to deploy Java as a single JAR file.

Re: Bitwarden compatible server written in Rust

#85
post #11
post #7

I’ve been really diving into Rust over this holiday break and reading through code bases like this is really helpful. Little things like a shared db connection are not intuitive on the first pass when everything is under such a strict borrow/move/release paradigm. I’m going to study this a little closer but it still isn’t super clear to me. In other languages I would probably implement a singleton of some sort. I kno…

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

I actually know Go very well. Wrote it for years. I like learning languages and using them in all kinds of different ways. I see a lot of overlap with Go and Rust. My interest in Rust is the small runtime and potential code reusability between server, client (mobile and web [wasm]). No GC means much smaller runtime in WASM I’m hoping.

Re: Bitwarden compatible server written in Rust

#86
post #73
post #58

When Lastpass began charging for multi-device access, I sought out free alternatives that could be self-hosted, because I figured I wanted to own my passwords, even if they're encrypted at-rest, and I didn't want to have my life held hostage by a company that has a change of heart regarding the cost of password availability. I had heard of Bitwarden before, and looked into it. The stack struck me as incredible for a…

LastPass was great for almost 10 years until LogMeIn bought them and they've been messing around with the business model and pricing ever since. I paid $12/year for several years to get mobile access. Then after they were bought I was somehow automatically upgraded to their premium plan for $36/yr. They had given notice but it went into my Promotions inbox and it was months before I realized it. Every year since they…

Trusting a company with your most valuable long-term data (passwords, medical/family records, etc.) is a losing game on a long enough time horizon (5 years, let alone 15 or 25).

You can arbitrage by trying to choose more than one. But IMO, the most robust solution is to make your data "dumb" and commoditize the storage layer.

With something like pass, I have my passwords physically located on all my devices, encrypted at-rest. Plus, I have a backup on a home server that can be regularly backed up to any commodity storage provider (backblaze, aws, whatever).

With this, you'd need to both lose (1) all your devices (2) internet access to those devices. This kind of thing is a bit predictable, and can be mitigated.

With a managed secret-manager service, mere corporate shenanigans or internet connectivity problems can take them away from you! Those are less predictable, and the only mitigation is to move to a service that doesn't have these problems.

Re: Bitwarden compatible server written in Rust

#87
post #11

Earlier quoted context omitted.

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

I personally don’t see the appeal of Go. With Rust, I can write a concurrent, safe, and C-performant program with modern programming features like matches, generic programming, and a dedicated package manager (never understood go get). To boot, Rust has a strong ecosystem and the fastest web framework out there (Actix). It takes roughly the same amount of code to do networking stuff in Rust and Go, but with Rust it i…

Whether or not it’s clear significantly depends on one’s familiarity with the language.

I’ve been working through the latest AoC in Rust and it’s been eventually very nice looking once I’ve got all the functional features used correctly, but my Go solutions from last year are also elegantly read.

The biggest difference to me is explicitly managing memory or not. This is neither an explicit advantage or disadvantage though. In some cases, it’s tremendously powerful, and in others, it’s an unnecessary cognitive load.

Re: Bitwarden compatible server written in Rust

#88
post #81
post #43

Earlier quoted context omitted.

Good to know! I've been looking at Go because it's "smaller, lighter, faster" than C# but from this description Rust might be a better next language to learn. Thank you!

learn both. golang is vastly more productive than rust for me. better tooling, faster build times, smaller less complex language. rust is fantastic for building highly performant safe code at the expense of developer productivity. builds times are atrocious and tooling isn't as polished as golang. both at great languages.

The build times and a major differentiator to me. All my Rust projects with a handful of crates (those in turn have their own dependencies) take tens of minutes to build. In Go, a project with similar dependencies compiles in seconds.

Re: Bitwarden compatible server written in Rust

#89
post #37
post #11

Earlier quoted context omitted.

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

Once I got used to writing in Rust, I found it really hard to mess up. I sort of like it for applications, although some idioms can be a bit verbose and hard to parse visually and mentally. First, thanks to default immutability of variables and the borrow checker, I trust that I'm far less likely to accidentally mutate something and cause an action-at-a-distance bug. Second, I absolutely love idiomatic Rust error han…

> And unlike Go or C, I don't have to remember to check the error every single time.

How do you mean? I’ve been writing Rust frequently lately and you still have to check the case. Do you mean that the compiler will nag you if you stunt so you don’t have to remember to do it because you’ll be reminded?

That’s one of the things common Go linters do that I wish was built into the compiler. It’s silly that an unused dependency is a compiler error but an unchecked error/return value is not.

Re: Bitwarden compatible server written in Rust

#90
post #83
post #11

Earlier quoted context omitted.

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

.NET isn't slower than golang, and in fact, can be faster.

That’s probably true comparing nearly any languages.
Post reply on HN