Tiny • Elegant • Fast

Vyrn

A Modern Lua-inspired Programming Language

Embedded Scripting Optional Typing Bytecode VM Standalone / Compile MIT License

Concise, lightweight, and designed for small-scale applications and embedded scripting. Built entirely in PureBasic — bringing the familiar elegance of Lua while evolving its own unique language characteristics. Optionally ship as a self-contained folder/EXE (full language) or compile-safe scripts to native via libvyrnrt.

Key Features

Ultra Lightweight

Minimal footprint with zero extra dynamic libraries needed. Ideal for embedding and small tooling.

Lua-Inspired Syntax

Familiar, clean, and quick to learn for Lua developers — with modern keywords and optional typing.

Built for Embedding

Seamlessly embeddable into host applications written in PureBasic or C via native ABI / DLL.

Optional Typing

Parameter, return, binding and struct annotations with runtime checks; use --strict for compile-time.

Developer Tooling

vyrn build, bundle, serve, REPL, --dump, --strict, --bench and more.

Native Packaging (Ship)

Standalone — full language + stdlib as a distributable folder/EXE.
Compile — @compile-safe scripts to native via libvyrnrt (no PureBasic runtime needed).

Language Snapshot

Modern keywords with full Lua compatibility

Modern Keywords

def let elif const continue match struct / enum

Legacy function / local / elseif still accepted.

Core Capabilities

  • Optional types & multi-return
  • String interpolation "Hello, {name}!"
  • Closures, upvalues & varargs
  • Coroutines + yield
  • Protected calls (pcall / xpcall)

Quick Example

Vyrn supports both its own syntax and classic Lua style

greet.vyrn Optional Typing
-- Vyrn (Optional Typing)
def greet(name: string) -> string
    return "Hello, " .. name .. "!"
end

def calculate_bonus(score: number) -> number
    return score * 1.1
end

print(greet("Vyrn"))
print(calculate_bonus(100))

-- Output:
-- Hello, Vyrn!
-- 110

Tooling & Ecosystem

CLI Toolchain

Build, bundle, serve and benchmark from the command line.

vyrn build vyrn bundle vyrn serve REPL --strict --bench

Vyrn IDE

Official standalone IDE — zero config, custom highlighting, multi-file support.

Syntax Highlighting Run / Debug Portable

Native Packaging & Embedding

Ship as Standalone (full features via Vyrn.dll + optional C host) or Compile-to-native (libvyrnrt). Also embed via C ABI / DLL / C#.

C ABI DLL / LIB PureBasic

Project History

2016

Initially written as LuaLiteVM in PowerBasic 10.04

2018

Rewritten in FreeBasic 1.05 using FBEdit

2024

Rewritten in the latest PureBasic and renamed to Vyrn

2025

Optional typing, structs/enums, coroutines, strict mode, build/bundle/serve, native C ABI

2026

Ship paths mature: Standalone packaging + Compile-to-native (libvyrnrt), SSE/streaming HTTP, zlib/crypto file helpers, and official standalone Vyrn IDE released (syntax highlighting, multi-file, run/debug)

Get Started

Clone the repository, explore the examples, and start embedding Vyrn in your next project.

Environment: Windows 10/11 · PureBasic 6.41+ recommended