←back to thread

383 points hkalbasi | 1 comments | | HN request time: 0.2s | source
Show context
ComputerGuru ◴[] No.42814963[source]
There’s been a lot of interest in faster linkers spurred by the adoption and popularity of rust.

Even modest statically linked rust binaries can take a couple of minutes in the link stage of compilation in release mode (using mold). It’s not a rust-specific issue but an amalgam of (usually) strictly static linking, advanced link-time optimizations enabled by llvm like LTO and bolt, and a general dissatisfaction with compile times in the rust community. Rust’s (clinically) strong relationship with(read: dependency on) LLVM makes it the most popular language where LLVM link-time magic has been most heavily universally adopted; you could face these issues with C++ but it wouldn’t be chalked up to the language rather than your toolchain.

I’ve been eyeing wild for some time as I’m excited by the promise of an optimizing incremental linker, but to be frank, see zero incentive to even fiddle with it until it can actually, you know, link incrementally.

replies(2): >>42815523 #>>42817147 #
sitkack ◴[] No.42815523[source]
I solved this by using Wasm. Your outer application shell calls into Wasm business logic, only the inner logic needs to get recompiled, the outer app shell doesn't even need to restart.
replies(2): >>42815568 #>>42816920 #
ComputerGuru ◴[] No.42815568[source]
I don’t think I can use wasm with simd or syscalls, which is the bulk of my work.
replies(1): >>42816000 #
1. sitkack ◴[] No.42816000[source]
I haven't used SIMD in Rust (or Wasm). Syscalls can be passed into the Wasm env.

https://doc.rust-lang.org/core/arch/wasm32/index.html#simd

https://nickb.dev/blog/authoring-a-simd-enhanced-wasm-librar...

Could definitely be more effort than it is worth just to speed up compilation.