kyro can currently be installed through source. Basic knowledge about using a terminal is expected.

To install, follow these steps:

Prerequisites

Clone the repository locally

git clone https://github.com/externref/kyro 
cd kyro

Make the script executable in the shell

Make sure you're in the repository's directory and run the following command:

chmod +x install.sh
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process

Build and setup the language binary (and library)

./install.sh
.\install.ps1

Note: What do these installation scripts do?

  • Both scripts run cargo build -r to compile the release binary.
  • Create a .kyro directory in the user's home folder.
  • Move the binary in target/release/ and the lib/ directory to the .kyro folder.
  • Set the KYRO_HOME environment variable and add the binary folder to PATH for systemwide CLI access.

Test the Installation

Create a test file with any name, for this example we'll use main.kyro:

var io = use("std:io");

fn main() {
    io.println("hello, world!");
}

main();

Run this command:

kyro main.kyro

Expected Output:

externref@MSI:~/projects/kyro$ kyro main.kyro
hello, world!
externref@MSI:~/projects/kyro$