Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sounds like an opinion that welcomes Rust and Go since they use static linking or am I wrong?


I think you can dynamic link Rust, but the ABI is unstable.

https://doc.rust-lang.org/reference/linkage.html


The 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.


Go 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.


Kind 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.


Torvalds and the OP are talking about userland software.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: