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.

  • BB_C@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    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✋
    • bodaciousFern@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 days ago

      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

      • BB_C@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        8 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/