Has anyone tried to compile Crystal with cosmopolitan libc for a portable binary?
If not, how hard is it generally to make Crystal work with an alternative libc?
Has anyone tried to compile Crystal with cosmopolitan libc for a portable binary?
If not, how hard is it generally to make Crystal work with an alternative libc?
I’m not aware of anyone trying that.
Effort depends on how much the interface differs from the existing C standard libraries. But it’s likely not that much for the majority of bindings. So you could copy and paste a lot. I’d expect to get probably > 90% working pretty quickly. Figuring out all the details in edge cases can be time consuming, though.
Previous mention on the issue tracker: Can crystal lang implement the APE binary format? · Issue #12753 · crystal-lang/crystal · GitHub
I might give this a go after the Battlesnake spring league (a few months). My free time is pretty booked until then.