Luak
  • Home
  • Docs
  • Examples
  • Playground
GitHub
  • Home
  • Docs
  • Examples
  • Playground

Documentation

Overview

Learn Lua

Introduction Variables & Types Control Flow Functions Tables Strings & Patterns

Using Luak

Getting Started Standard Library Embedding Guide Platform Support

Documentation

Two tracks: pick the one that matches where you're starting from. They link into each other, so it's easy to cross over once you know what you're looking for.

New to Lua? Start here

No Lua experience assumed. Covers the language itself, not yet Luak's embedding API.

Introduction

What Lua is, and what its syntax looks like.

Variables & Types

The eight types, local vs global, and truthiness rules.

Control Flow

if, while, repeat, and the numeric and generic for loops.

Functions

Multiple returns, varargs, closures and method syntax.

Tables

Lua's one data structure: arrays, dictionaries, and both at once.

Strings & Patterns

String basics and Lua's lightweight pattern matching.

Already know Lua? Add Luak

Installing, embedding, and what to expect target by target.

Getting Started

Add the Gradle or Maven dependency and run your first script.

Standard Library

Base, package, table, string, coroutine, math, utf8, io and os.

Embedding Guide

LuaPlatform.standardGlobals() on every target, plus luajava and javax.script on the JVM.

Platform Support and Limitations

What changes target to target: files, require, environment variables, weak tables.

Basalt

Luak is a Lua runtime for Kotlin Multiplatform.

© 2026 Basalt.

Luak is MIT licensed. This site is MIT licensed.

Project

  • Home
  • Examples
  • Playground

Resources

  • Documentation
  • Source
  • License

JetBrains and Kotlin are trademarks of JetBrains s.r.o. Lua is a trademark of Lua.org, PUC-Rio. These logos are the property of their respective owners. Basalt Luak is an independent project and is not officially affiliated with, endorsed by, or sponsored by JetBrains or Lua.org.

Special thanks

JetBrains Kotlin Lua