There is no release date for full windows support scheduled. We’re focusing on a stable 1.0 release first. Hopefully we can ship full windows support in one of the next minor releases.
But windows support is already pretty good, you can do a lot of stuff on windows. It’s not production ready, but for many use cases development on windows should work very well.
Crystal’s stdandard library aims to be cross-platform compatible. A program that builds for linux should also build for macos or windows for example.
Of course you won’t need WSL to run a Crystal program on windows. The compiler already builds on windows and we run CI against it. And it’s pretty stable.
You can’t run the exact same executable on windows and linux, but that should be obvious because they have differene executable formats.
Crystal uses LLVM as backend for code generation, so you can technically compile to any format supported by LLVM. For example LLVM bytecode with crystal build --emit llvm-bc
. I’m not sure how useful that is for portable executables (I assume that’s what you’re aiming for). Probably not much.
It would require LLVM to run the bytecode and you loose a lot of the benefits of compiling directly to a binary exectuable format.
You can technically build a library from Crystal code. But there are some gotchas concerning the standard library runtime which isn’t expected to be compiled into a binary library.
Crystal libraries are usually distributed as source code and directly compiled into the final executable. This allows the compiler to analyze the entire program and do its magic.