hello.
I’m a blind game developer and because most game engines are trashy ableist, I decided to find a programming language.
so crystal does almost everything I need except, it has no package manager
yes shards exists but it doesn’t have a central repo for packages.
also, cross compiling is basic and I need better cross compilation support.
if the devs of this wonderful language could address these shortcoming I’m willing to even donate to the project.
because I know crystal may become what I need.
While there is no central repository, there are registries you can search. For example https://shardbox.org keeps a curated list of shards.
What issues do you have with cross compilation? Using zig cc could help simplify things… granted you’d still have to compile every external library you need for every target you must support, but there is little we can do there.
Well, I don’t know how to do this.
Hello and welcome back!
It has been a while, but I’ve been exploring approaches (as a hobby, on and off over the past few years) on a simplified cross-compilation of Crystal applications:
And I’ve made a Docker container image named crystal-xbuild that contains all the packages necessary to cross-compile simple command-line applications to Linux (both x86_64 and aarch64 platforms) and macOS.
I’ve used this image to cross-compile drift
, the migration management CLI I use for SQLite3 in my personal projects:
You can check how that is implemented part of GitHub Actions inside the release workflow YAML file:
My long-term objective is to develop a shards’ extension (Eg. shards-xbuild
that works similar to build
command, but for cross-compilation, which automatically downloads the needed elements for the target platform you indicated and the discovered/needed libraries for it to build.
Since compilation of some Crystal projects needs the pkg-config information before the actual linking, it might need to rely on the optional Shards’ libraries
support.
Anyhow, lot of technical details and that definitely does not solve your immediate needs, but definitely the Crystal team could allocate resources and prioritize if interest and funding were available.
Cheers,
You’re great thanks for the job you’re doing, sadly I don’t care about linux that much since I can drop the src onto my linux remote box and it’ll just do the bs for me for glibc and no-one uses musl on desktop so
I want to cross compile to windows, from my crappy Mac :p
And because I literally can’t make errors in crystals by accident because the syntax is too good for that, well, I even don’t need a vscode extension
Well, I’d love a cosmopolitan target. I mean: generate a single executable that works on win/mac/linux/bsd+x86_64/arm64
Heck yeah, cosmo target, gimmeeeeeeeee!
yeah I would really want crystal to use cosmopolitan libc that would be so darn cool! maybe someone could inplement it?
edit, the zig cc way doesn’t work because the only libraries in the guide are for linux, no windows versions so it won’t work for my usecase.
TIL! This is wild!
It’s one crazy piece of software and written by someone so talented that it’s also very fast.
It brings some complex questions, though. It builds on top of static libraries to build fat executables, fine, but what about accessing proprietary external libraries only available as .so or .dll for this or that target? Or libraries that need to be platform specific, such as a GTK or QT to build GUI applications?
cosmo_dlopen