Getting started


Currently, the only way to compile okta code is via the oktac compiler, so the first step is to set up oktac.

The most straight-forward way to get oktac is by downloading the binary file of the latest release from the downloads page. You can also find instructions on how to build it from source here.

Now that you have the oktac binary ready to use, let's compile a simple "Hello world!" program to check if everything is ok.

Create a main.ok file with the following content with your favorite text editor (vim for sure 😉):

extern fun printf(&u8, ...)

fun main(): u8 {
    printf(@cstr("Hello okta! 🐙\n"));
}

Run the following command to compile main.ok:

oktac main.ok -o hello

If all went as expected, no errors should appear and a hello named binary should exist in the current directory. Let's run it and see what happens:

./hello

The fancy Hello okta! message with the octopus should appear in your terminal.

If you get an error or you can't get oktac running, please consider submitting a ticket with the issue, refer to the Contribute page for how to do this.

Syntax highlighting

You can optionally install a syntax highlighting plugin for convenience:

NOTE: If you consider creating a syntax highlighting plugin for your favorite editor, please let me know!

Next steps

Currently, there is no more guides on okta. But you can look in the following sources to get more information: