Replies: 1 comment
-
Of the top of my head try compiling to WASM then WASM to c and finally cosmocc |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
👋 I'm trying out OpenBSD (and loving it!) but 7.2 stable doesn't include a package for Helix 😢 . Snapshots do, but I've got other issues with
-current
that will likely prevent me from using that.Soooo, in the meantime, I'm trying to figure out ways to get Helix on my OpenBSD system (among many other Rust programs I want).
cargo install
doesn't work for many Rust packages right now because of an issue with system curl (I think). I tried building a statically-linked binary on macOS per this article and copying the artifacts over to OpenBSD but haven't had luck there either.Then I found this delightfully tantalizing approach, which uses Cosmopolitan libc as a custom cargo build target. I'm not an expert in C but it appears as if this would allow me to compile a portable executable on one machine and copy it over (with Helix-specific supporting files) to OpenBSD and have it Just Work™.
The author of the last article managed to do this with ripgrep (example repo compiled against Cosmopolitan libc), which seemed to me roughly equivalent in complexity to Helix, further fueling my notion that this could actually work. I've tinkered with cloning the ripgrep example and tweaking for Helix and attempting to compile on a Debian system, but I haven't gotten this to build correctly yet. From my own experience--and from the article's notes--I think most of the complexity is figuring out how to tell cargo to "just use cosmopolitan.a for everything":
So, I figured I'd put the question to y'all, who likely know far more than I do about whether or not an approach like this would be possible with Helix. If it is, I feel like this might be a great strategy for distribution, as one binary would work on "Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS," according to the author of Cosmopolitan libc.
If Cosmo is too young and unproven to consider using for official distributions, I'd still love instructions for the adventurous like me to compile Helix against it while we wait for it to mature.
Beta Was this translation helpful? Give feedback.
All reactions