-
-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static binaries for releases #183
Comments
I could use some help on this. It seems we will need to use this: https://github.com/nh2/static-haskell-nix#static-haskell-nix |
FWIW a semi-static executable that only depends on libc would probably be fine for most people? Like what you get from Go and Rust, often. Unless you're linking against some other C libraries. |
FWIW, this is what the current executable links to (on linux): $ ldd (which neuron)
linux-vdso.so.1 (0x00007ffe79d92000)
libm.so.6 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libm.so.6 (0x00007f7bb2490000)
libz.so.1 => /nix/store/3bfzi6w3067hbdyl15vmypjn4q6az9j6-zlib-1.2.11/lib/libz.so.1 (0x00007f7bb2471000)
liblua.so.5.3 => /nix/store/yaim51rzjyrp2dia8d954fywnwkp77na-lua-5.3.5/lib/liblua.so.5.3 (0x00007f7bb2436000)
libncursesw.so.6 => /nix/store/zp8v7wkbplvmzyds87icn1rk070hizdc-ncurses-6.1-20190112/lib/libncursesw.so.6 (0x00007f7bb23c4000)
libpthread.so.0 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libpthread.so.0 (0x00007f7bb23a3000)
librt.so.1 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/librt.so.1 (0x00007f7bb2397000)
libutil.so.1 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libutil.so.1 (0x00007f7bb2392000)
libdl.so.2 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libdl.so.2 (0x00007f7bb238d000)
libgmp.so.10 => /nix/store/av3zmkb577zk4ds4xhzixdhvdvh726r7-gmp-6.1.2/lib/libgmp.so.10 (0x00007f7bb22f7000)
libffi.so.6 => /nix/store/j1gs46vkawlk9mz8lc9g0xfi94hwrcv7-libffi-3.2.1/lib/libffi.so.6 (0x00007f7bb22eb000)
libc.so.6 => /nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/libc.so.6 (0x00007f7bb2135000)
/nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27/lib/ld-linux-x86-64.so.2 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x00007f7bb2628000) |
FWIW I've been working on building static Haskell binaries for a couple of weeks now. I bundled all my work into my nix-hs tool. If you're open to the idea of moving this project over to nix-hs I'd be glad to help. |
EDIT: neuron doesn't use reflex-platform anymore. |
Neither When I have some time I'll take a look at the current build system and try to understand it. |
#262 might be a useful step towards this. cf. NixOS/nixpkgs#43795 (comment) |
We now have a docker image (autoupdates in CI) that weighs ~100MB: https://neuron.zettel.page/c6176636.html |
Static binaries are still an easier way to allow packaging for other distribution / operating systems. |
I think that it is extremely important to get binaries going as soon as possible. I love the idea, but I definitely do not want to install a brand new package manager and Haskell support just to run this. What I love about Neuron is that it's lightweight and portable; while that's definitely true with the markdown files, it's not true with Neuron itself yet. It should be as simple as a |
haskell.nix officially supports building static binaries: https://input-output-hk.github.io/haskell.nix/tutorials/cross-compilation/#static-executables-with-musl-libc not sure if switching to it is worth it. |
macOS binaries could not be built; see the linked PR comments for details. If somebody wants to give it a try, start by replacing The upcoming release should contain at minimum Linux static binaries. |
v1.0 got released. The official Linux static binary is linked from here: https://neuron.zettel.page/install.html I will close this; if somebody wants macOS binaries, let's open a new issue for that. |
Any chance for a native Static Binaries for Windows? |
@RoyiAvital Unlikely, but you can use |
The issue is I don't want (Others just can't for instance Windows Home users) to install WSL. What's the blocker for having a static native binary for Windows? |
Mainly because I don't use Windows, and I like to stay in Nix ecosystem so
that I can spend my time programming rather than battling packaging
systems. That said, if others are interested in contributing Windows
support I'd be happy to accept as long as it doesn't introduce non-Nix
maintenance burden for me. Since neuron is essentially a Haskell package it
should be theoritically possible, as others have done it, eg:
https://www.reddit.com/r/haskell/comments/jkyvr7/how_to_write_an_installer_for_your_haskell/
… |
btw, WSL is available for Windows Home users
|
@srid , any chance opening a dedicated issue for the Windows support effort? |
As someone else commented on lobste.rs, it would be nice to have pre-generated static binaries so users who don't have Nix and Haskell setup don't have to install a whole new toolchain to use Neuron.
[text below added by @srid]
The text was updated successfully, but these errors were encountered: