Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DA
Posts
3
Comments
1
Joined
2 yr. ago
Rust Programming @lemmy.ml
danyel @lemmyrs.org

Announcing unrar v0.5.0

[disclaimer: initially posted on Reddit r/rust]

unrar is a library for listing and extracting RAR archives.

Hi lemmyrs!

Almost 8 years ago, I release my first Rust crate. Today, before I leave Reddit at the end of the month due to the recent controversy, after months and years working on and off on this update, as a parting gift, I'm happy to announce the crate's biggest release ever. This really is a milestone release that, among others, allows one to extract files directly into memory -- something people have been asking forever how to do.

I've also completely rewritten major parts of the library and am very proud of the way things are looking right now. Utilizing the typestate pattern, the library enforces correct usage at compile time, only exposing methods when they make sense (depending on a combination of open mode and current cursor position).

Before this release, the library was hard t

Rust Lang @lemmyrs.org
danyel @lemmyrs.org

Announcing unrar v0.5.0

[disclaimer: initially posted on Reddit r/rust]

unrar is a library for listing and extracting RAR archives.

Hi lemmyrs!

Almost 8 years ago, I release my first Rust crate. Today, before I leave Reddit at the end of the month due to the recent controversy, after months and years working on and off on this update, as a parting gift, I'm happy to announce the crate's biggest release ever. This really is a milestone release that, among others, allows one to extract files directly into memory -- something people have been asking forever how to do.

I've also completely rewritten major parts of the library and am very proud of the way things are looking right now. Utilizing the typestate pattern, the library enforces correct usage at compile time, only exposing methods when they make sense (depending on a combination of open mode and current cursor position).

Before this release, the library was hard t

Rust: Support @lemmyrs.org
danyel @lemmyrs.org

Using OnceCell with Regex (for reading only)

I've been using lazy_static until now but was trying to migrate to OnceCell. It seems I can't have a OnceCell

<Regex>

even though I'm never calling mutable methods on the regex. I'm not even using multiple threads.

The error I'm getting is:

Any way to solve this or do I have to use OnceLock / continue using lazy_static? I don't want to add the overhead of using OnceLock if not necessary.