Quick Start

Starting your first Talos project

After Talos has been successfully installed, the executable will be available for developing applications. So let's build a simple program!

Prerequisites: Talos must be installed and available on your $PATH. See the installation guide for setup.

Create Project

Initialize a new project with talos cm init.

Terminal
talos cm init my-app # creates project "my-app"

This will output a folder named my-app with the following layout.

_main.tal
_crate.jsonc

Note: Currently the cm init command is not implemented. Instead, construct the above folder layout and follow the next step for configuration.

Configuring _crate.jsonc

Similar to package.json for JavaScript, Talos utilizes _crate.jsonc configuration files. It contains project metadata for running Talos applications and for configuring the toolkit.

_crate.jsonc
{
    "name": "@user/my-app",
    "version": "1.0.0",
    "main": "library/_main.tal",

    "tasks": {
        "start": "talos run library/_main.tal"
    }
}

Note: See the configuration section for advanced usage.

Editing library/_main.tal

Let's update the contents of library/_main.tal with the following code:

_main.tal
Debug.println("Hello, World!");

Running library/_main.tal

To now run our script, we can invoke the runtime a variety of ways:

# launch the script with an explicit path
talos run library/_main.tal

What Next?

Congratulations! You've built your first Talos program. From here, the world is your oyster and you can build whatever your heart desires.

On this page