News for hackers. Stuff that matters.
Re:Improving Rust compile times to enable adoption of memory... by zozbot234 on Friday February 03, 2023 @07:08AM (#34640079)
Practically all Rust crates make heavy use of monomorphized generics, so every use of them in a new project is bespoke and has to be compiled on the spot. This is very different from how Go or Node work. You could compile the non monomorphic portions of a Rust crate into a C-compatible system library (with a thin, header-like wrapper to translate across ABI's) but in practice it wouldn't amount to much.
Re:Improving Rust compile times to enable adoption of memory... by Tobu on Friday February 03, 2023 @10:08AM (#34642000)
Some popular proc-macros could be pre-compiled and distributed as WASM, and it would be impactful, since they tend to bottleneck the early parts of a project build. However I don't think that could be made entirely transparent, because right now there's a combinatorial explosion of possible syn features. For now I avoid depending on syn/quote if I can.