4 ms·
Yea def. I think Linux's ABI diaspora and the way it handles dependencies is pain, and the root behind both those distro methods you mention, and why software i
by the__alchemist 1y ago
Yea def. I think Linux's ABI diaspora and the way it handles dependencies is pain, and the root behind both those distro methods you mention, and why software is distributed as source instead of binaries. I contrast this with Rust. (And I know you can do this with C and C++, but it's not the norm:
- Distribute a single binary (Or zip with with a Readme, license etc) for Windows
- Distribute a single binary (or zip etc) for each broad Linux distro; you can cover the majority with 2 or 3. Make sure to compile on an older system (Or WSL edition), as you generally get forward compatibility, but not backwards.
- If someone's running a Linux distro other than what you built, they can `cargo build --release`, and it will *just work*.
- optionalsquid 1y agoAnother nice thing is that, if you can live with the slower musl malloc, then building a "universal" Linux binary with Cargo takes just two commands: $ rustup target add x86_64-unknown-linux-musl $ cargo build --target x86_64-unknown-linux-musl --release Similarly for cross-compiling for Windows
- the__alchemist 1y agoI should try that!
- tyingq 1y agoIt may be fixed now, but devil's in the details. As one example, musl has (or had) chronic issues with it's dns resolver and large responses.
- optionalsquid 1y agoDefinitely. I haven't tried building anything that requires DNS using musl, but I've had to work around musl's much, much slower malloc implementation The musl wiki lists a number of differences between it and glibc that can have an impact: https://wiki.musl-libc.org/functional-differences-from-glibc.html https://wiki.musl-libc.org/functional-differences-from-glibc...