Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Welcome to Kiwi 🥝

Kiwi is a new, high-performance programming language designed for simplicity.

Why Kiwi?

  • It is fast.
  • It is readable.
  • It tastes good.

Getting Started

Installation

To install the Kiwi compiler, run:

curl --proto '=https' --tlsv1.2 -sSf https://kiwi-lang.org/install.sh | sh

Verify Installation

kiwi --version
# Output: Kiwi v0.1.0

Hello World

Language Basics

Variables

In Kiwi, variables are immutable by default.

Syntax

#![allow(unused)]
fn main() {
// Since Kiwi is new, we use 'rust' highlighting 
// as a placeholder until we add custom highlighting
let name = "Kiwi";
let count = 10;
}

To make a variable mutable, use mut:

#![allow(unused)]
fn main() {
let mut x = 5;
x = 6;
}

Functions

Control Flow