this post was submitted on 16 Apr 2025
41 points (90.2% liked)

Rust

6833 readers
3 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

Instead of emitting one giant crate containing everything, we tweaked our SQL-to-Rust compiler to split the output into many smaller crates. Each one encapsulating just a portion of the logic, neatly depending on each other, with a single top-level main crate pulling them all in.

top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 4 days ago

i don't really know how much could they optimise more, but they can predict it by fitting the number of cores with the amount of time taken, that is amdahl's law.

[–] [email protected] 4 points 1 week ago

Impressive improvement! But why did they choose Rust to compile on demand in the first place, if compile time was that important?

[–] [email protected] 4 points 1 week ago

What's the advantage of compiling to Rust here? Maybe it would be faster if they just skipped straight to LLVM.

[–] [email protected] 7 points 1 week ago (2 children)

Cool and all. But missing some experiments:

  • cranelift
  • multi-threaded rustc
  • undoing type erasure after the split
  • lto = "off"
  • strip = false (for good measure)
  • [PRIORITY] a website that works with Tridactyl✋
[–] [email protected] 1 points 6 days ago* (last edited 6 days ago) (1 children)

multi-threaded rustc

I am still quite ignorant of the workings of rust/rustc (I'll learn it tomorrow, I swear!) but I'm surprised that multi threaded compilation isn't available by default. make/gcc have had it for several decades

[–] [email protected] 6 points 6 days ago

make uses multiple processes for parallelism, or what the blog post (below) calls "interprocess parallelism". cargo/rustc has that and intraprocess parallelism for code generation (the backend) already. the plan is to have parallelism all the way starting from the frontend. This blog post explains it all:

https://blog.rust-lang.org/2023/11/09/parallel-rustc/

[–] [email protected] 3 points 1 week ago

[PRIORITY] a website that works with Tridactyl✋

A man of culture.

[–] [email protected] 36 points 1 week ago* (last edited 1 week ago) (1 children)

They changed the graphic already but holy AI on a stick! Now his arm is still behind the saw but his fingers are already gone. Lol

[–] [email protected] 3 points 6 days ago

well at least the saw works right