Re:Show HN: Blades – fast static site generator written in Rust
by bacondude3 on Tuesday October 13, 2020 @12:27AM
(#24762268)
It looks like Hugo does provide a static executable. I'm aware that Go is known for providing standalone binaries, but last time I checked Hugo's website I didn't notice the binary installation method [0], which is why I mentioned it as equivalent with Jekyll. I'll give it another look.
Regarding Ruby, Gems on Linux is a mess that I don't want to have to deal with for anything, but especially not for a static site generator.
Rust probably could provide a precompiled binary, but the recommended installation method for Blades involves `cargo` which is why I asked the question.
https://gohugo.io/getting-started/installing/#binary-cross-p...
Re:Show HN: Blades – fast static site generator written in Rust
by cyphar on Tuesday October 13, 2020 @11:21AM
(#24766439)
> Rust probably could provide a precompiled binary, but the recommended installation method for Blades involves `cargo` which is why I asked the question.
Cargo is the Rust compiler (or rather the Rust build system). After you run it, it'll spit out a binary which you can use elsewhere. If I'm reading your question correctly, this would be analogous to seeing a reference to CMake in a C++ project's README and then asking whether C++ supports precompiled binaries.
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.
Doesn't go or rust give you a static executable?