News for hackers. Stuff that matters.
Re:Bitwarden compatible server written in Rust by todd3834 on Thursday December 23, 2021 @10:28AM (#29662716)
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 know that can be done with Rust but I’m struggling to find examples that I can understand in the wild. Most examples are small single main.rs files.
Re:Bitwarden compatible server written in Rust by mikece on Thursday December 23, 2021 @10:37AM (#29662823)
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?

Re:Bitwarden compatible server written in Rust by uncomputation on Thursday December 23, 2021 @11:24AM (#29663365)
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 is more performant and I can sleep better knowing that if it compiled, it is at least safe and won’t have any concurrency bugs.

A quick back of the paper example, I am doing Advent of Code this year and the same exact implementation took 40 ms in Rust and 350 ms in Go. Not to mention the Rust implementation, despite being the same semantically, was more concise and clear due to Rust’s extensive Iterator trait methods. A small difference you might say, but it’s just one less reason for me to switch.

Re:Bitwarden compatible server written in Rust by novok on Thursday December 23, 2021 @01:31PM (#29664831)
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 amount of restrictions) and compile speed. If you have a multi-million line monolith made in rust, I bet your compile speed and edit-build-run cycle will take a very long time and be very painful compared to the same golang one. Hiring will also be harder because the minimum IQ & experience bar is higher and you couldn't have productive jr engineers get up to speed on it nearly as quickly.

Re:Bitwarden compatible server written in Rust by azth on Thursday December 23, 2021 @03:23PM (#29666049)
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 by todd3834 on Thursday December 23, 2021 @05:31PM (#29667240)
Is this more a matter of preference? Some people feel it is more expressive, others feel it is too verbose. Some people prefer the object oriented design principles, others are turned off by them and really just want structs.

I agree the single file argument is not extremely convincing. Especially because engineers are often on Mac on Windows machine and compiling for Linux. While Go does support this, as soon as you have to use a c library dependency (in my experience this was sqlite), then we had to start compiling in the environment we wanted. Easy to solve with docker but deployment wasn't the reason I like Go.

I should spend some time thinking about why but overall I just "feel" more productive with Go vs Java (including Kotlin). Go's standard library, docs (with links to the source code), everything just feels super readable and understandable.

I don't see much debate agains Go using less memory. I can confirm this was my experience as well. My experience is that it uses a lot less CPU as well.

Re:Bitwarden compatible server written in Rust by azth on Friday December 24, 2021 @10:15PM (#29680044)
> Is this more a matter of preference?

No it isn't. On many times I've been able to simplify golang code that is dozens of line long into something that is only a few lines long in Java, while improving readability and reliability. This is especially useful when exploring a new code base and spending a lot of time perusing boilerplate trying to figure out what's going on.

Re:Bitwarden compatible server written in Rust by fomine3 on Thursday December 23, 2021 @08:38PM (#29668982)
Java app can be a single executable by using GraalVM Native Image
Re:Bitwarden compatible server written in Rust by ViViDboarder on Thursday December 23, 2021 @04:24PM (#29666650)
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 by mikece on Thursday December 23, 2021 @11:29AM (#29663417)
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!
Re:Bitwarden compatible server written in Rust by masklinn on Thursday December 23, 2021 @11:44AM (#29663564)
Do be warned that although interesting and rewarding and amazing in all sort of ways Rust is not easy. Where Go was designed such that it takes hours to pick up, Rust requires weeks, and possibly months before you build the intuition around the borrow checker.

If you've been looking at go, it's really not much of an investment to try it out (I wouldn't heartily recommend it as I dislike the language but you do you).

Re:Bitwarden compatible server written in Rust by metaltyphoon on Friday December 24, 2021 @09:08AM (#29673678)
All those quotes are funny. "Smaller" as in the amount of keyword? Because you definitely need to type a lot more to get the same thing done. "Lighter" as in executable size? I'll give you this for the basic hello world apps. "Faster" ? That's just not true.
Re:Bitwarden compatible server written in Rust by jatone on Thursday December 23, 2021 @02:49PM (#29665732)
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 by ViViDboarder on Thursday December 23, 2021 @04:26PM (#29666669)
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 by masklinn on Thursday December 23, 2021 @10:56AM (#29663051)
> 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?

A good type system is appealing regardless of the context.

The ecosystem can also be nice (or known) e.g. serde is amazing when dealing with all sorts of serialisation schemes. The tighter resource control can also be useful for application space, and it was most certainly one of the goals for vaultwarden as complexity aside the heft of the official server was a large part of the motivation (e.g. the ability to run it on a Pi or a small VPS)

An other longer-term option is that I can imagine e.g. coding something in rust then extracting its core or bits and bobs to libraries, and exposing that in C or Python or what have you. Nowhere near as attractive (or easy) with Go.

Re:Bitwarden compatible server written in Rust by rectang on Thursday December 23, 2021 @11:12AM (#29663227)
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 handling of returning a Result (especially combined with the question-mark operator). It forces me to deal with error conditions. Unlike C# or Python or Java or C++, I don't have to worry that any code could throw an exception at any time. (Rust code can panic, but panics generally represent unrecoverable errors — see http://joeduffyblog.com/2016/02/07/the-error-model/#bugs-are... ) And unlike Go or C, I don't have to remember to check the error every single time.

I still have to write functionality tests for Rust code, but once I've done that I feel like the code is mostly locked down. It's harder to get to that sense of security in other languages.

Re:Bitwarden compatible server written in Rust by jcelerier on Thursday December 23, 2021 @12:12PM (#29663862)
> Unlike C# or Python or Java or C++, I don't have to worry that any code could throw an exception at any time. (Rust code can panic, but panics generally represent unrecoverable errors — see http://joeduffyblog.com/2016/02/07/the-error-model/#bugs-are... )

I just don't understand this logic. Exceptions are the same (C++ exceptions use the very same unwinding mechanism than panics in Rust as far as I can see), why would you forbid yourself to catch_unwind ? It's just making your software worse for no reason, users always will be happier with an app that shows a small "warning: internal error. Document backup saved in </some/place/>. $software will now shutdown", than seeing macOS or Windows's crash dialog.

Re:Bitwarden compatible server written in Rust by rectang on Thursday December 23, 2021 @12:39PM (#29664175)
For application code, you can change the behavior of Rust panics. Although I haven't verified this myself, I fully expect that you can achieve saving a document and exiting gracefully.

The distinction is that panicking should (almost) never be used for recoverable errors. You can, but that's not idiomatic and would only be appropriate within the confines of your own application. Recoverable errors in Rust should be handled by return values, typically via either Result or Option.

This is unlike all the other options I listed (except Go, and C++ with exceptions disabled), where it is idiomatic to use exceptions to handle recoverable errors.

In theory, (strictly) checked exceptions are equivalent (isomorphic) to error codes as an error handling mechanism. But as soon as unchecked exceptions are allowed, it all falls apart and you must contend with the problem of "invisible control flow". Not having to deal with "invisible control flow" in Rust is one of the things that makes me much more confident that the code actually does what it looks like it does.

The Joe Duffy blog post I linked to earlier compares various error handling methods, including checked exceptions. It's very long, but interacting deeply with this blog post helped me to level up my understanding of error handling. FWIW I did a presentation on Duffy's article for the San Diego chapter of Papers We Love: https://www.youtube.com/watch?v=GwPBC4mWfFQ

Re:Bitwarden compatible server written in Rust by jcelerier on Thursday December 23, 2021 @04:57PM (#29666977)
> You can, but that's not idiomatic

I know that this is a fairly contrarian take, but I strongly believe than the emphasis on idiomatism is more harm than good. The only thing that matters is the language spec - everything that fits in there is kosher. Idioms just create pointless fights and tabs vs spaces situations where there doesn't need to be any.

> Not having to deal with "invisible control flow" in Rust is one of the things that makes me much more confident that the code actually does what it looks like it does.

no, you just choose to ignore it. I can also write C++ code with throw and no try..catch and that will give the same result (as I pretty much use exceptions like one would use panic! in rust). I don't know anyone who would say that this is a good idea. My sweet spot is to have a few catch handlers around the main loop which catch 99% of the unrecoverable issues, and sometimes, when it turns out that an issue has a way to be recovered (or that maybe it doesn't matter), then someone gets a try..catch block.

Like most articles about exceptions, that Joe Duffy post talks about the problem of "where the control flow goes". I've written my first lines of C++ something like 17-18 years ago now and not once it has actually been an issue. Consultants sure do love selling it as one though.

Re:Bitwarden compatible server written in Rust by rectang on Thursday December 23, 2021 @08:12PM (#29668783)
> I know that this is a fairly contrarian take, but I strongly believe than the emphasis on idiomatism is more harm than good.

My response is that adherence to common idioms is simultaneously beneficial and harmful. It is beneficial because shared assumptions and shared understanding facilitate cooperation, yet it is harmful because it impedes innovation. Whether it is more beneficial or more harmful on balance depends on the situation and on individual taste.

I'd like to think that our perspectives are compatible.

> > Not having to deal with "invisible control flow" in Rust is one of the things that makes me much more confident that the code actually does what it looks like it does.

> no, you just choose to ignore it.

I guess you could characterize things that way. For example, in the Rust library code I write, I choose to ignore certain unrecoverable errors — e.g. out-of-memory panics from allocating ordinary sized objects, even though such panics can theoretically occur.

But the distinction here is that I also expect e.g. invalid argument values or "file not found" errors to be handled via Rust's Result type. I don't choose to ignore such events — I expect all recoverable errors to be handled via visible control flow, where you can identify every location in the code that such an error might occur. This makes it easier to reason about control flow for all circumstances save unrecoverable errors.

> My sweet spot is to have a few catch handlers around the main loop which catch 99% of the unrecoverable issues

Yes, that's an Anders-Hejlsberg-endorsed way of doing things. "The exception handling should be centralized, and you should just protect yourself as the exceptions propagate out to the handler." https://www.artima.com/articles/the-trouble-with-checked-exc...

I think the preference for one way of doing things can depend on what problem domain you work in. That approach is highly suitable for applications programming.

(Duffy has done a lot of work on operating systems; my biggest projects have been libraries.)

> Consultants sure do love selling it as one though.

EDIT: I'm not very happy about that take, and I originally wrote up a lengthy response — but it turns out I had incorrectly recalled that this was not the first such interaction we've had. (I was recalling an obnoxious post from a different European with the first initial "j"). I've deleted my response because it's OT and not worth dealing with if it's not something recurring.

Re:Bitwarden compatible server written in Rust by ViViDboarder on Thursday December 23, 2021 @04:29PM (#29666703)
> 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 by rectang on Thursday December 23, 2021 @08:37PM (#29668978)
I mean that in Rust, you have to work kinda hard to drop an error on the floor and leave it unhandled.

It's easy and idiomatic to write code which calls `unwrap`, so that's what everybody does when they don't want or need to write sophisticated error handling code. But that's not the same as forgetting to check a return value — when something goes wrong, `unwrap` panics.

I mean, if you're determined you can definitely drop an error in Rust, e.g. with a `match` arm that does nothing. But the easy path is to `unwrap`.

Re:Bitwarden compatible server written in Rust by JeremyNT on Thursday December 23, 2021 @09:45PM (#29669445)
I learned rust before go and I was shocked by the (lack of) error handling in go.

unwrap feels lazy, but it's obvious what is doing and it's impossible to do nothing. With go error handling is entirely optional.

Re:Bitwarden compatible server written in Rust by mikece on Thursday December 23, 2021 @11:49AM (#29663614)
> "Once I got used to writing in Rust..."

How long did that take and what resources did you use to learn?

Re:Bitwarden compatible server written in Rust by rectang on Thursday December 23, 2021 @12:03PM (#29663754)
I started off with standard materials like "Rust By Example". I also tried to use Rust for simple stuff like command line utilities.

Then I started working on a personal project, which motivated me to bull through lots of difficult problems. (This personal project happens to have been bindings for Apple Core Audio, but the point is to pick something you care about enough to motivate yourself.)

Finally, I've found users.rust-lang.org invaluable.

The first major challenge for me was the error handling ("WTF is `Box<dyn std::error::Error>`? What is `Box`? What is `dyn`?"). It got in the way as soon as I even tried to write command line utilities. Once you learn it, it's amazing, but out of the gate I continually stumbled and fell flat on my face.

The second challenge was harder: coming from OOP languages, I was accustomed to structuring everything as large mutable heap-allocated classes with private fields, accessors, and an emphasis on opaque data structures and encapsulation. That is not idiomatic Rust, so I had to unlearn it and discover architectural alternatives.

I don't know exactly how long it took before I felt comfortable, since I was learning in disconnected spurts rather than immersively all at once. It wasn't quick, though.

Re:Bitwarden compatible server written in Rust by ATsch on Thursday December 23, 2021 @11:02AM (#29663106)
It's definitely true that being good for writing services wasn't really a big design goal of rust and it's far from the lowest friction language to do it in. However it is still a mainstream high performance language with a rich type system and amazing compile time error checking and that makes it attractive to use for many other things if you are already used to it.
Re:Bitwarden compatible server written in Rust by dagmx on Thursday December 23, 2021 @12:00PM (#29663723)
Rust has found use in userspace apps. In fact I'd say most prominent use is stuff people interact with everyday.

Firefox has portions written in Rust. 1passwd, Dropbox etc...

If you use Visual Studio Code, it uses ripgrep which is built in rust.

I use Rust for most of my servers now. It's replaced Python + flask in many cases, without too big a difference in my code.

Re:Bitwarden compatible server written in Rust by blub on Thursday December 23, 2021 @02:12PM (#29665318)
Programming languages like C and C++ have been used to write user space apps for decades. A language which can only be used for kernel space code is a niche within a niche within a niche. If Rust were only capable of that it would barely register on anyone's radar and be dead on arrival. In fact it's only recently that serious work was started on using Rust in a mainstream kernel (Linux); every project that Rust is known for is running in user space.

People are confused about what system programming means and a lot of that confusion comes from parts of the Rust community which want to carve out a niche for Rust and keep claiming that Rust is particularly suited to system programming, as opposed to Go or D or other languages which are in reality also capable of tackling many system programming jobs, but have a garbage collector.

Re:Bitwarden compatible server written in Rust by celliopia on Thursday December 23, 2021 @11:21AM (#29663334)
Why are the Rust proponents so triggered by what seems to be an honest question about the popularity of Rust? I don't know the first thing about Elixir or Erlang but I realize there are some powerful properties of BEAM and if there seemed to be a trend to rewrite apps into BEAM apps I would want to know what am I missing out on that, if clued-in, I would join the rush as well. I think that's what OP is saying here (perhaps clumsily) but why vote the question down so aggressively? Makes you look like a thin-skinned lot who don't like to explain yourselves which would be a reason to avoid the "Rustacean" community.
Re:Bitwarden compatible server written in Rust by uncomputation on Thursday December 23, 2021 @11:36AM (#29663494)
To be fair, if there were a trend to write things in Erlang and someone posted “why use Erlang and not Rust? what am i missing?” I would also expect that to be down-voted. Nothing specific to Rustaceans here. I don’t agree with downvoting the comment because it is contributing to a conversation which is what HN is all about, but it was probably the assumption that Go is already the winner in the space of networked apps when Rust has many good technical qualities as well. Like you said, clumsily worded.
Re:Bitwarden compatible server written in Rust by dagmx on Thursday December 23, 2021 @12:02PM (#29663747)
Where are you seeing "triggered" comments? Every reply to that person has been very balanced and neutral, and the question seems to have a positive vote at this point.
Re:Bitwarden compatible server written in Rust by azth on Thursday December 23, 2021 @03:21PM (#29666044)
.NET isn't slower than golang, and in fact, can be faster.
Re:Bitwarden compatible server written in Rust by ViViDboarder on Thursday December 23, 2021 @04:30PM (#29666716)
That’s probably true comparing nearly any languages.
Re:Bitwarden compatible server written in Rust by todd3834 on Thursday December 23, 2021 @03:32PM (#29666126)
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 by 12ian34 on Thursday December 23, 2021 @10:52AM (#29663005)
I'm not very opinionated on Rust's comparison to other languages, but to me it does seem like rewriting things in rust (which now even has its own acronym RIIR) has become trendy.

Trendy enough that the very fact that rust tools happen to be written in that language is used as a main selling point.

Re:Bitwarden compatible server written in Rust by hiptobecubic on Thursday December 23, 2021 @11:07AM (#29663168)
This is true for basically every budding community. "Rustaceans" writing tools for writing rust, in rust, seems like a gimmick, but every language goes through this period. JavaScript is probably the single biggest offender I can think of, but other examples include rewriting Vim plugins in Lua even though neovim supports vimscript, rewriting literally anything in Go, rewriting python libraries in Julia, etc.
Re:Bitwarden compatible server written in Rust by adgjlsfhk1 on Thursday December 23, 2021 @12:57PM (#29664425)
I don't think the example of rewriting python in Julia is the same. Most python libraries get re-written (or implemented) in a faster language. If your choice is rewriting in C++/Fortran, or writing rewriting in Julia, The Julia version will be way nicer to use, and will probably be faster than calling the low level library from python.
Re:Bitwarden compatible server written in Rust by hiptobecubic on Friday December 24, 2021 @11:54AM (#29675161)
You're talking about rewriting performance sensitive code when it makes sense to do so. I'm talking about rewriting random libraries because developers like to wallow in their tooling.
Re:Bitwarden compatible server written in Rust by giancarlostoro on Thursday December 23, 2021 @11:09AM (#29663187)
I remember a time when people called Go a systems language, is that time over now?
Re:Bitwarden compatible server written in Rust by rectang on Thursday December 23, 2021 @11:23AM (#29663352)
Go can't be used for many "systems programming" problem domains because it's garbage collected. That objection is always looming when people try to call Go a "systems programming language", so I think a lot of people now classify Go as an applications programming language instead.
Re:Bitwarden compatible server written in Rust by masklinn on Thursday December 23, 2021 @11:36AM (#29663492)
The only people who did that was the Go team itself, and they did so in contravention of the usual interpretation of the term, as by it they meant either the completely meaningless "you can built systems with it", or that you could build systems services or utilities (which is not what is usually meant by "systems language").
Re:Bitwarden compatible server written in Rust by blub on Thursday December 23, 2021 @01:58PM (#29665159)
I'm not aware of any official or standard definition of system programming. There's application programming and anything which doesn't fit in there is system programming which can be low-level, middleware, etc.

Go is appropriate for writing services / daemons, command line tools, servers, etc. It's not well suited for writing operating system code and very performance-intensive code (databases, audio/video, etc), but there's still a big overlap with Rust.

It seems to me that this whole discussion keeps coming up because parts of the Rust community are worried about the competition. And they have reason to be :-)

Re:Bitwarden compatible server written in Rust by jatone on Friday December 24, 2021 @10:58AM (#29674611)
golang is absolutely capable of writing databases and audio/video code. the libraries just dont really exist for the audio/video stuff.

but there are DBs written in go.

Re:Bitwarden compatible server written in Rust by terhechte on Thursday December 23, 2021 @10:45AM (#29662936)
I‘m on Mobile right now, but in that case you’d wrap your db in a Arc<RwLock<~>> (or Rc<> if you don’t need concurrency.). Then, anytime you need to access the DB, you’d try to lock the RwLock’s Writer or reader.
Re:Bitwarden compatible server written in Rust by andrepd on Thursday December 23, 2021 @11:45AM (#29663572)
But isn't this imposing a runtime cost on safety? Isn't rust all about safety and performance?
Re:Bitwarden compatible server written in Rust by terhechte on Thursday December 23, 2021 @12:06PM (#29663784)
It is a matter of tradeoffs and requirements. Arc<RwLock> is a solid solution for most use cases. If the requirement is (just making up an unlikely extreme scenario) to have a huge amount of threads which constantly lock the RwLock a better solution might be to just open multiple connections per database, each per thread. SQLite, for example, is build with this in mind.

For a reasonable amount of locking, The Arc / RwLock dance offers good performance (other languages, like Swift, use something like Arc for every property access (although the compiler tries to optimise it away)).

The safety is actually better because you're forced to think about the failure case. I don't have good memories of Objective-C where some Foundation calls don't throw (in they don't have an error parameter), but just throw random undocumented exceptions. (Not saying that some Rust calls don't panic, but knowing that something can go wrong is much better than learning about it in production).

Re:Bitwarden compatible server written in Rust by opportune on Thursday December 23, 2021 @11:57AM (#29663683)
Under the hood most (all? Hesitate to say all but probably all) clients will have some form of mutex lock to at the very least control access to the file (eg socket) they use to pass messages to the server. If you find an example otherwise I’d like to hear it, though do keep in mind the mutex may not even be implemented in userspace.

Which is to say, accessing a client may or may not be thread safe (depending on the client implementation) but assuming it’s not a multiplexing client, it almost certainly uses some kind of locking mechanism under the hood

Even if it is a multiplexing client, if you saturate the internal clients you will either need to wait for a client to stop writing to its socket (through perhaps a lockless consumer model) or create a new internal client (slow).

Re:Bitwarden compatible server written in Rust by vngzs on Thursday December 23, 2021 @12:04PM (#29663769)
In Rust, abstractions tend to be zero-cost, but things that actually impact runtime are as fast as you write them.

Concurrency problems don't magically disappear because your language can check for them. You still need to use memory-safe patterns, but the compiler will force your hand and prevent you from doing unsafe things accidentally.

In the end, this makes it far easier to build correct, concurrent applications. If you decide to try some fancy new pattern that doesn't require locking, the compiler can guarantee the memory safety of your new implementation.

Re:Bitwarden compatible server written in Rust by jjice on Thursday December 23, 2021 @12:02PM (#29663749)
Yes, but I can see it being worth while when you can spare the tiny amount of overhead, especially in a project that's meant to be self hosted like this.