UP | HOME

Rust

Table of Contents

:CUSTOM_ID: rust

Picked up - it seems like an extremely good book. Excited to read it. The topics are quite interesting! - I really appreciate that the book isn't coming from a "rust is the greatest ever of all time" perspective. They immediately point out issues with dependencies.. etc.

2. Things I strongly dislike:

  • No spec.
  • Inability to bootstrap itself. People argue "but the front-end is fully bootstrapped". IMO this is splitting hairs. I can't take a rustc and build another rustc.
  • Cargo re-implements git, but poorly.
    • For example, it respects /etc/gitconfig but ignores local .git/config overrides. This means that every single time I do a cargo install of something I am prompted to allow access to my ssh key for every single dependency!
  • The dividing line between crate and stdlib leans way too far to the crate side of things.
    • Remote dependencies are needed to do virtually everything. There isn't even a rand package in the standard library.
      • Other missing things of note:
        1. regex
        2. date / time
        3. "low-level I/O futures and traits are not yet provided in the standard library"
        4. http
    • This creates a HUGE exposure. Now instead of trusting a core team of developers, I have to put trust in every single dependency in addition to the core team. Any one of them is a potential supply chain injection point!
  • Implicit returns.

    • Semicolon on return changes behavior:
    fn add1(a: i32, b: i32) -> i32 {
        a + b
    }
    
    fn add2(a: i32, b:i32) -> i32 {
        a + b;
    }
    
    fn TypeOf<T>(_: &T) {
        println!("{}", std::any::type_name::<T>())
    }
    
    fn main() {
        let a = add1(1, 2);
        let b = add2(1, 2);
    
        TypeOf(&a);
        TypeOf(&b);
    }
    
    • At least the compiler errors on this though.
  • Overly complex - seeming to solve self made problems: Rust let b: i32 = 20; let c = 30i32; let d = 30_i32
  • Crate breakage across minor releases of rust.
    • Pre-Rust 1.45 this feature was marked as unstable . But post 1.45 it was stable. - Libs that use this new feature only bumped their semver patch level when they moved to 1.45. This caused unexpected breakage. - For example: async-process v1.0.1 was broken.
    • This leaves the ecosystem needing to "always be on the latest rust" - which is not a desirable place to be, especially given you are forced to rewrite things because of breakage!
    • Rust 1.80 breaks a ton of stuff: https://github.com/NixOS/nixpkgs/issues/332957
      • [2024-09-16 Mon] Continuing to see fallout from this!

Author: Aaron Bieber

Created: 2025-08-07 Thu 11:37

Validate