News for hackers. Stuff that matters.
Re:151-byte static Linux binary in Rust by swetland on Sunday January 11, 2015 @01:03PM (#8870611)
This is cute, but is there a way to actually create static binaries with the standard tooling and not jumping through hoops?

Hello World in Rust with tip of tree (as of yesterday) is a ~500K binary that depends on glibc and friends.

Switching from println!() to std::io...write_str() actually made it larger!

Re:151-byte static Linux binary in Rust by steveklabnik on Sunday January 11, 2015 @01:59PM (#8870849)
You can't static link glibc, so our static binaries still have a dynamic dependency on it.
Re:151-byte static Linux binary in Rust by swetland on Sunday January 11, 2015 @02:47PM (#8871005)
Is there a process for making a fully static binary (say if I were to substitute an alternate libc, or provide my own low level wrappers for syscalls, or whatnot)?
Re:151-byte static Linux binary in Rust by steveklabnik on Sunday January 11, 2015 @03:00PM (#8871059)
Yes, that's totally possible. You can write a kernel in Rust if you want.
Re:151-byte static Linux binary in Rust by tdrd on Sunday January 11, 2015 @06:10PM (#8871712)
...is it documented anywhere? where?
Re:151-byte static Linux binary in Rust by steveklabnik on Sunday January 11, 2015 @06:59PM (#8871839)
Re:151-byte static Linux binary in Rust by swetland on Sunday January 11, 2015 @08:00PM (#8872006)
The example minimal do-nothing program there is much smaller (8k), but still results in a dynamic binary requiring glibc.

The only unresolved symbol is: __libc_start_main@@GLIBC_2.2.5

Re:151-byte static Linux binary in Rust by daurnimator on Sunday January 11, 2015 @04:29PM (#8871398)
I believe musl supports static linking
Re:151-byte static Linux binary in Rust by ChickeNES on Sunday January 11, 2015 @07:21PM (#8871899)
Any reason one couldn't use musl instead for static linking? (http://www.musl-libc.org/)
Re:151-byte static Linux binary in Rust by cowsandmilk on Sunday January 11, 2015 @02:24PM (#8870942)
and for many, there are legal issues with statically linking glibc due to its license.