Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to build video games for Windows using Crystal (blaxpirit.com)
6 points by RX14 on July 10, 2017 | hide | past | favorite | 6 comments


Currently a fork of Crystal is needed to cross-compile Crystal applications for Windows. However, we are working on merging that work into the standard library, and extending the work to the whole stdlib. Currently not enough of the standard library is covered to cross-compile the Crystal compiler. We have implemented a `Crystal::System` namespace which we plan on using to hold platform-specific parts of Crystal's stdlib, so that merging windows support doesn't make the standard library "ifdef hell".

Questions welcome :)


This is a great article. However I'm curious how much work is actually needed to get a seamless / native Crystal experience on Windows?


Two things:

1. We need to get windows support to cover the entirety of the standard library (when it's possible of course). This will also allow us to cross-compile the Crystal compiler onto Windows, which bootstraps the whole Windows port and makes it truly usable.

2. We then need to merge that windows support into the standard library. We have already identified the abstractions required to make sure we can isolate the platform-specific parts of the standard library and have started moving some platform specific code there (see [1]). It's early days but this work should continue and will allow us to slowly merge windows support as a series of small and reviewable PRs, instead of one massive unreviewable chunk. The first part of windows support is already merged and in the latest release here [2]. [1] https://github.com/crystal-lang/crystal/tree/b3c8f87fbe43669... [2] https://github.com/crystal-lang/crystal/pull/4491


Crystal is a Ruby inspired compiled language, allowing it to run blazingly fast with a very low memory footprint. It relies on LLVM for emitting native code, thus making use of all the optimisations built into the toolchain.

Website: https://crystal-lang.org/


When Crystal will be ready on Windows, could exist a nice Installer? Something like accept, next, next, next, finish.

:-)


Should be easy enough to make the installation process as simple as possible. Even after we get windows support complete you'll need some libraries and the msvc toolchain to compile for windows, so it's likely that we'll make a nice and simple installer that automates the process.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: