static and dynamic linking

2022-07-26

Let us simplify the model by assuming there is an executable (exe) and a single dependency (dep)

For a language that lacks ABI (such as Rust), the challenge with dynamic linking is that new versions of a dep will require rebuilding the exe, unless multiple versions of the dep are kept around (which defeats the point of dynamic linking). That flaw does not affect the exe that has static linking, since they have all they need embedded in them.

Beyond that, dynamic linking has clear wins...

It's not an easy trade, so actual numbers would help. Assuming there are no other problems related to dynamic linking, there are two alternatives: