3 ms·
Theoretically you could link to a .so with just `#[link(name="soname", kind="dylib")]` in the code. The hairy part is finding the library on the system, and th
by pornel 8y ago
Theoretically you could link to a .so with just `#[link(name="soname", kind="dylib")]` in the code.
The hairy part is finding the library on the system, and that's a mess that Rust merely inherited. The build scripts are there to run pkg-config, search system lib dirs, and compile a fallback if necessary (next everyone suggests to just have Cargo automatically figure it out, until they see how deep the rabbit hole goes for snowflake libraries like openssl and llvm).
- bscphil 8y agoI guess the critical question is whether it's built up to the point that anyone wants to use it yet. It's one thing to have theoretical support for dynamic linking, but if in practice everyone just ships giant static binaries (which seems to be the emerging default for Go, node, etc), it doesn't help you much.