Making desktop apps with crystal, cli or gui

I am not a professional programmer, but here is how I create command-line tools in Crystal:

  1. Make it open-source. This way, GitHub Actions can be used for free, so there is no need to pay for CI. These actions will automatically run and upload releases when a version tag is added.
  2. For Linux, use the official Docker image to create statically linked binaries.
  3. For Mac, do not create statically linked binaries because the method is not yet established. Instead, provide a homebrew tap so users can install it using the brew command.
  4. For Windows, if the project is purely written in Crystal, you can create statically linked binaries by using the --static option. It is difficult to call C libraries on Windows.

For the GUI, there are not many good options. But if you only need to support Linux and Mac, I think gtk4 is the best choice. If you want to support Windows, there are no best practices, so you will have to write your own code and run around.

1 Like