Improving Rust compile times to enable adoption of memory safety

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. rustc_codegen_cranelift

    Cranelift based backend for rustc

    Cranelift is not used for debug builds by default. I think that's probably a goal (although I'm not actually 100% sure about that just because I'm not dialed into what the compiler team is doing). Even the OP mentions this:

    > We were able to benchmark bjorn3's cranelift codegen backend on full crates as well as on the build dependencies specifically (since they're also built for cargo check builds, and are always built without optimizations): there were no issues, and it performed impressively. It's well on its way to becoming a viable alternative to the LLVM backend for debug builds.

    And the Cranelift codegen backend itself is also clear about it not being ready yet: https://github.com/bjorn3/rustc_codegen_cranelift

    (To be clear, I am super excited about using Cranelift for debug builds. I just want to clarify that it isn't actually used by default yet.)

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. Cargo

    The Rust package manager

    `cargo build -j11` will limit parallelism to eleven cores. Cargo and rustc use the Make "jobserver" protocol to coordinate their use of threads and cores, even when multiple rustc processes are running (as long as they are part of the same `cargo` or `make` invocation):

    https://github.com/rust-lang/cargo/issues/1744

  4. ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

    I originally posted this on reddit[1], but figured I'd share this here. I checked out ripgrep 0.8.0 and compiled it with both Rust 1.20 (from ~5.5 years ago) and Rust 1.67 (just released):

        $ git clone https://github.com/BurntSushi/ripgrep

  5. evcxr

    I've started liking evcxr (https://github.com/google/evcxr) for REPL. It's a little slow compared to other REPLs, but still good enough to be usable after initial load.

  6. sccache

    Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.

    For the branch-switching usecase you might get some milage out of sccache [1]. For local storage it's just one binary and two lines of configuration to have a cache around rustc, so it's worth testing out.

    1: https://github.com/mozilla/sccache

  7. rustls

    A modern TLS library in Rust

    > you could try to make OpenSSL memory safe by rewriting it in Rust

    Or just write a better crypto stack without the many legacy constraints holding OpenSSL back. Rustls (https://github.com/rustls/rustls) does that. It has also been audited and found to be excellent - report (https://github.com/rustls/rustls/blob/main/audit/TLS-01-repo...).

    You're suggesting writing this stack in a GC language. That's possible, except most people looking for an OpenSSL solution probably won't be willing to take the hit of slower run time perf and possible GC pauses (even if these might be small in practice). Also, these are hypothetical for now. Rustls exists today.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Building a Fully Static Linux Executable in 2021

    2 projects | /r/rust | 30 Dec 2021
  • Zig Makes Rust Cross-compilation Just Work

    3 projects | /r/rust | 22 May 2021
  • Git Blame work around

    6 projects | /r/HelixEditor | 4 Jun 2023
  • Examples of old (ca. 1.0.0+) Rust code that still compiles?

    17 projects | /r/rust | 15 Feb 2023
  • How I got involved in the Rust community

    7 projects | news.ycombinator.com | 9 Dec 2022

Did you know that Rust is
the 5th most popular programming language
based on number of references?