> Right now, we depend on glibc, and it cannot be statically linked.
Could you expand on this? Why can it not be statically linked? > Right now, we depend on glibc, and it cannot be statically linked.
Could you expand on this? Why can it not be statically linked?[1]: https://sourceware.org/glibc/wiki/FAQ#Even_statically_linked...
[2]: http://stackoverflow.com/questions/3430400/linux-static-link...
Does rust currently expose any way to do this? Could I perform linking myself as a workaround?
You can but it requires lots of black magic, and certainly a nightly rather than beta Rust ;)
http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-... is an old blog post that can get you started.
Most people who focus on 100% statically linking just use a different libc. For example, Stali Linux, [1] has this to say: http://sta.li/faq
> it [is] nearly impossible to use glibc for static linking in non-trivial programs.
That said, if you want to give it a shot, it's technically possible, though we don't expose it for Rust yet, due to these kinds of landmines.
1: which got linked here a few times, most recently https://news.ycombinator.com/item?id=7261559