News for hackers. Stuff that matters.
Re:Show HN: Blades – fast static site generator written in Rust by cyphar on Tuesday October 13, 2020 @11:14AM (#24766355)
Both Go and Rust do not produce static binaries by default -- they both link to glibc and a few other libraries -- but you can coerce them both to do so (though with Rust it's slightly more painful because you need to install a compiler toolchain that uses musl, but rustup makes it pretty painless).
Re:Show HN: Blades – fast static site generator written in Rust by jjnoakes on Tuesday October 13, 2020 @05:39PM (#24770618)
By static I meant go and rust dependencies bundled into the executable. Dynamically linking to libc is ok with me, any system I run on has a usable libc.
Re:Show HN: Blades – fast static site generator written in Rust by cyphar on Wednesday October 14, 2020 @12:39AM (#24773135)
Though it should be noted that when you compile such a binary on a system with a newer glibc, it will not work on a system with an older glibc. To be fair this is basically the case with C as well (you can work around it with .symver but it's kind of dodgy), but it is worth keeping in mind.
Re:Show HN: Blades – fast static site generator written in Rust by jjnoakes on Wednesday October 14, 2020 @02:17PM (#24779738)
Yes, this is true for a great many things. If I compile these pseudo-static binaries for use on multiple different linux distributions or libc versions, I compile on the oldest/lowest common denominator so that it runs everywhere I need it to.