Cosmo Docs
  • 👋Welcome to the Cosmo Docs!
  • General Information
    • ⭐Getting Started
    • 🧱Modules
    • 🌐Meta methods
  • Contributing
    • 🤝Welcome!
    • ⚛️Intrinsics
    • 📝Grammar
Powered by GitBook
On this page
  • Installation
  • Cosmo Installer
  • From source
  • Writing a "Hello, world" program
  1. General Information

Getting Started

This page will cover how to install Cosmo make your first program!

PreviousWelcome to the Cosmo Docs!NextModules

Last updated 1 year ago

Installation

Cosmo Installer

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 experience any problems or bugs, please .

From source

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.

  1. Download the .

  2. Install .

  3. 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.

Writing a "Hello, world" program

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.

⭐
here
create an issue
source code
Crystal
I named mine test.
What a full main function should look like.
The output of this script.