>> To this end, I mainly >> point out that rust should roll in local native static libraries, and >> just live with global native dynamic libraries. > > How does rustc know the difference? Because the "local native" libraries > are tagged as #[link(once)]? (nit: maybe link(static) would be clearer?)
You're correct, this is the reason that I added the #[link(once)]. I don't want rustc to start guessing about LD_LIBRARY_PATH and weird business like that, so I'd rather that the author just be explicitly about the native library. I also agree that #[link(static)] is clearer. > Is this just a matter of changing what is hashed when we construct the > symbol name (or dropping the symbol hashes entirely)? That doesn't > seem very far. Are there are a lot of other things standing in the > way that immediately come to mind? Can we try and document what those > issues are? This is correct. This is tangentially related to https://github.com/mozilla/rust/issues/10207 along with https://github.com/mozilla/rust/issues/10208. I have many thoughts on this, although they don't quite relate to static linking, so I'll try to write them up later. The main idea is that the SVH from 10207 is in all symbol names, and the SVH is a hash of "all reachable things" which includes many things you may not initially consider (many of which you pointed out). _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev