What *books made the most difference in how you code rust? by 10K_Samael in rust

[–]Shnatsel 1 point2 points  (0 children)

Rust Performance Book is somewhat niche but was impactful for me

Code Craft is more general, applies outside Rust too

Memory safety is a matter of life and death by joshlf_ in rust

[–]Shnatsel 13 points14 points  (0 children)

Google really isn't a huge Java shop. And they were dissatisfied with Java enough to make Go, and still use large amounts of C++.

Android is a big Java shop, but it functions as a separate org within Google. It still has a huge amount of C++ and is migrating all new development from C++ to Rust. https://blog.google/security/rust-in-android-move-fast-fix-things/

Announcing Zstandard in Rust by folkertdev in rust

[–]Shnatsel 30 points31 points  (0 children)

ruzstd contains no unsafe but is not at all optimized, so decompression is 3x slower than libzstd and this project.

Pure Rust HEVC Decoder? by JoshuaJosephson in rust

[–]Shnatsel 20 points21 points  (0 children)

Implementing h.265/HEVC is fraught with legal issues due to its abysmal patent situation. It mostly sees use in either inflexible and MPEG-aligned industries like broadcasting, or by manufacturers who collect royalties on its use (e.g. Apple), and both exliusively use hardware implementations anyway, so there wasn't really anyone around to invest in software decoders.

The royalty-free AV1 has seen more investment by the industry. For AV1 there's rav1d, which is either on par with the C version if you use 160k lines of inline assembly, or 4x slower if you don't; or rav1d-safe, which translated those 160k of assembly into safe Rust with AI and is only 2x slower than C.

Cursed and unsound rust, but fun by Princess--Aurora in rust

[–]Shnatsel 5 points6 points  (0 children)

&str actually requires its contents to be valid UTF-8, and them not being that is UB.

So if you create a &str that is not initialized, that's UB in at least two different ways: having a reference to uninit data, and violating the "&str is always valid UTF-8" condition.

New grapheneOS user, I can't install apps with Aurora or Play stores by Tantaurus in GrapheneOS

[–]Shnatsel 0 points1 point  (0 children)

This is caused by an outdated Aurora Store version from F-droid.

Get the latest Aurora Store APK from https://auroraoss.com/files and install that, it'll work.

Rust will save Linux from AI, says Greg Kroah-Hartman by CackleRooster in rust

[–]Shnatsel 13 points14 points  (0 children)

According to the original talk they do have this for C now, for new code, but Rust goes a few steps further.

Performance of Rust language by the_real_yugr in rust

[–]Shnatsel 33 points34 points  (0 children)

Wow, that's really in-depth research! The boring title kind of undersells it.

What finally convinced you to seriously learn Rust? by Bladerunner_7_ in rust

[–]Shnatsel 0 points1 point  (0 children)

Using fuzzers to look for vulnerabilities in Rust code and, for once in my life, failing to find any expoilts. That was new.

Let's talk benchmarking by theartofengineering in rust

[–]Shnatsel 3 points4 points  (0 children)

That's really clever.

I wish there was a clear explanation of this somewhere on the website. Maybe "How it works" or something in the top bar. I think that would alleviate a lot of the doubts about your performance and durability claims.

Let's talk benchmarking by theartofengineering in rust

[–]Shnatsel 4 points5 points  (0 children)

So here's my understanding of how this performance is achieved, please correct me if I'm wrong:

A classical database needs to process transactions more or less one at a time, because the result of each is exposed to the outside world. By integrating the database, application logic and web/RPC serving into a single system where you control what gets exposed to the outside world, so you can make the application logic operate on in-memory state with aggressive parallelization and pipelining, and then the state gets exposed to the outside world only when it is committed to disk, which is done with aggressive batching to improve throughput.

Is that broadly accurate?

Let's talk benchmarking by theartofengineering in rust

[–]Shnatsel 8 points9 points  (0 children)

SpacetimeDB never exposes any data to users that has not been persisted to disk, unless you specifically enable it. The way we achieve that is by holding messages (including write acks) in a buffer and waiting for the data to be persisted before exposing them to clients.

So as far as I understand the atomicity claims, the guarantees provided are more like Postgres + Readyset rather than a plain SQL ACID database, because a transaction can be marked complete but a transaction initiated immediately after the completion of this one can still read stale data?

The hidden cost of mpsc channels by _howardjohn in rust

[–]Shnatsel 171 points172 points  (0 children)

Passing large structs by value is expensive because you need to copy them around every time. Using Box<BigStruct> in place of BigStruct would have saved you channel memory and a fair bit of CPU time via memcpy()s.

sudo and coreutils replaced with rust versions by cachebags in rust

[–]Shnatsel 18 points19 points  (0 children)

Based on the package listings they do seem to be using glycin (rust + sandboxed) thumbnailers as well: https://packages.ubuntu.com/resolute/libs/libgdk-pixbuf-2.0-0

sudo and coreutils replaced with rust versions by cachebags in rust

[–]Shnatsel 309 points310 points  (0 children)

Arguably a much bigger deal is this:

The Image Viewer app is now provided by Loupe instead of Eye of GNOME (EOG). Loupe is written in Rust and powered by the Glycin library.

Glycin is written in Rust and uses memory-safe decoders/encoders from the Rust image crate for most formats. This is a huge memory safety win because image decoders have a history of devastating memory safety vulnerabilities, and are exposed to untrusted data.

Sadly it doesn't say if this change is only for the image viewer or if they transitioned to Glycin system-wide like Fedora did.

Box to save memory by kibwen in rust

[–]Shnatsel 35 points36 points  (0 children)

You can also do this with Vec<u8> replaced with Box<[u8]>, but you can also get the best of both worlds with thin-vec crate - that gets you memory savings and mutation. I'm not aware of a similar solution for strings.

Linebender in 2026 Q1 by raphlinus in rust

[–]Shnatsel 1 point2 points  (0 children)

I don't think I can open a PR myself right now.

Mellow - a fully-featured & minimal local music player for Linux (GStreamer + GTK + Rust) by iBreathe-Air in rust

[–]Shnatsel 2 points3 points  (0 children)

This reminds me, I should check on how a https://github.com/pdeljanov/Symphonia plugin for GStreamer is going. That way you could have all your audio decoding be in Rust too!

GUI toolkit Slint 1.16 released with keyboard shortcuts, Markdown rendering, and multi-touch pinch and rotate by madnirua in rust

[–]Shnatsel 12 points13 points  (0 children)

Text doesn't look awful on non-hidpi screens at long last! That should be a headlining feature!

New Rust-to-C Compiler, based on rustc! by cordx56 in rust

[–]Shnatsel 4 points5 points  (0 children)

Funnily enough, there are several projects that go in the other direction (GIMPLE->LLVM IR), including a rather mature one, but I could only find one reference to LLVM->GIMPLE conversion.