
How to build video games for Windows using Crystal - RX14
http://blaxpirit.com/blog/23/how-to-build-video-games-for-windows-using-crystal.html
======
RX14
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 :)

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

~~~
RX14
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...](https://github.com/crystal-
lang/crystal/tree/b3c8f87fbe436691a7b695ba0de946dd92353d19/src/crystal/system)
[2] [https://github.com/crystal-
lang/crystal/pull/4491](https://github.com/crystal-lang/crystal/pull/4491)

------
sdogruyol
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/](https://crystal-lang.org/)

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

:-)

~~~
RX14
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.

