1 unstable release

0.1.4 May 26, 2022

#56 in #scripting-language

MIT license

7.5K SLoC

Welcome to Kaon


A little scripting language written in rust.


Hello, World

A simple hello world program:

System.println("Hello, World!")


A slightly more convoluted example using classes:

class Vector {
    // A field
    var x = 0
    var y = 0

    // A constructor
    create new(a, b) {
        self.x = a
        self.y = b

    fun add(other: Vector) {
        self.x = self.x + other.x
        self.y = self.y + other.y

    // A method
    fun to_string() {
        return "{ x: " + self.x + " y: " + self.y + " }"  

fun main() {
    var v1 = Vector.new(4, 5)
    var v2 = Vector.new(6, 7)


    print(v1.to_string()) // -> { x: 10 y: 12 }


More examples can be found in scripts or tests/kaon.


  • object-oriented
  • Bytecode compiler and VM
  • Simple, straightforward syntax
  • Strongly typed; the compiler does its best to eliminate runtime errors

  • Getting Started

    To get started using kaon, first make sure you have cargo installed, then run the following commands:

    git clone https://github.com/PlutonianHacker/kaon-lang.git
    cd kaon-lang
    cargo build


    Currently the only way to run a Kaon script is with cargo run inside the kaon-lang directory. To run a file, use cargo run <FILE.kaon>, if no file is provided, interactive mode is run instead. To see a list of options, run cargo run -- --help.


    All contributions are welcome! If you find any bugs or have ideas to make the language better, you can open up an issue.


    Kaon is avaliable under the permissive MIT license.