4 ms·
This sounds like an opinion that welcomes Rust and Go since they use static linking or am I wrong?
by cjohansson 5y ago
This sounds like an opinion that welcomes Rust and Go since they use static linking or am I wrong?
- loeg 5y agoI think you can dynamic link Rust, but the ABI is unstable. https://doc.rust-lang.org/reference/linkage.html https://doc.rust-lang.org/reference/linkage.html
- deleted 5y ago[deleted]
- estebank 5y agoThe Rust ABI is unstable, the C ABI is stable. You can always dynamically link against a C object file, even one written in Rust. I would love to see a restricted stable Rust ABI for types without generics and trait objects and nothing else. That would enable library authors to easily express/provide a dynamic linking surface, while the default remains static linking. I tend to agree that things that "are part of the OS" like QT and GTK should be linked dynamically, while most other things shouldn't.
- kmeisthax 5y agoKind of. Go already has several other deal-breakers for systems programmers (garbage collected everything, runtime-provided greenthreading, etc). Rust is a lot closer to what Linus would approve for in-kernel development, but it still has a few problems, such as failed allocations panicking the system instead of returning an error that can be handled normally.
- LukaD 5y agoTorvalds and the OP are talking about userland software.
- _ph_ 5y agoGo is by default statically linked. You can however create shared libraries from Go which can be called like any C library and call any shared library.