javierhonduco / lightswitch

CPU profiler for Linux written in Rust
MIT License
7 stars 3 forks source link

Pre-compiled binaries for common platforms #87

Open kirs opened 1 month ago

kirs commented 1 month ago

For folks who don't use nix or Docker, it might be a good start to offer a pre-compiled library to download like rbspy does.

javierhonduco commented 1 month ago

This workflow builds the project statically on every commit to main as an artifact, see https://github.com/javierhonduco/lightswitch/actions/runs/11257035337/ for example.

But I do agree it would be ideal to add this to releases once we start doing them. Additionally, the current statically compiled binaries with glibc are a bit of a hack, as this is not well supported by this libc, and might cause issues. I've toyed around with musl in the past, but it seemed like it would take quite a bit of work to get it working well. Perhaps publishing AppImages is the way to go? They aren't common beyond desktop apps, but could work great here.

My only real concern is that this format is self-extracting, which might cause some security eyebrows to be raised...

+            # Unfortunately a bunch of unneeded libraries and other files are present in the
+            # AppImage, see https://github.com/ralismark/nix-appimage/pull/9#issuecomment-2402764168
+            appimage = nix-appimage.lib.${system}.mkAppImage {
+              program = "${lightswitch}/bin/lightswitch";
             };

(this can be built with nix build .#appimage, ./result --appimage-extract will dump the contents to a folder named squashfs-root)

javierhonduco commented 4 weeks ago

Let me know if the pre-compiled binaries work for you and / or if you have any preferences regarding app images and so on. In few weeks I'll start tagging proper releases and push artifacts there as well. Leaving this issue opened until that's done