Installation
kyro can currently be installed only 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 repo'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 does these commands do?
- both scripts run
cargo build -rto compile the language binary. - create a
.kyrodirectory in the home folder of the user. - move the binary in
target/release/and thelibdirectory to the.kyrodirectory. - add the directory as
KYRO_HOMEenvironment variable and add it to PATH for binary access systemwide.
Test
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$