kyro can currently be installed through source. Basic knowledge about using a terminal is expected.
To install, follow these steps:
Prerequisites
- Rust for compiling the binary: https://rust-lang.org/tools/install/
- Git (Optional) to clone the repo: https://git-scm.com/, alternatively, download it manually from GitHub.
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 -rto compile the release binary. - Create a
.kyrodirectory in the user's home folder. - Move the binary in
target/release/and thelib/directory to the.kyrofolder. - Set the
KYRO_HOMEenvironment variable and add the binary folder toPATHfor 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$