Getting Started
This page will cover how to install Cosmo make your first program!
Last updated
This page will cover how to install Cosmo make your first program!
Last updated
If you want a quick cross-platform setup, then the installer is for you. You can find the latest release for the Cosmo installer .
If you want to customize your installation, build your own fork of Cosmo, the installer isn't supported on your device, or you just don't want to use the installer, then this is for you.
Download the .
Install .
If on OSX/Linux, run sudo make install
. That's it. On Windows, just run shards build --release
and add the bin
folder to your PATH.
To get started writing your first Cosmo app, first create a new folder.
Now, create your Cosmo file. Cosmo sees files named main
or the name of your project as an entry point. I will use the name of my project in this case, test
, to give an example.
A main function is optional in Cosmo, except for if you want to accept the arguments the program was executed with. The args
parameter is also optional. Be sure to mark your main function as public
and return an int
, which will be the exit code of the program.
test
.