wren-lang/wren logo

wren-lang/wren

Free

The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.

FreeFree tier
Type
Open Source

About wren-lang/wren

Wren is a small, fast, class-based concurrent scripting language designed for embedding in applications. Inspired by Smalltalk, Lua, and Erlang, it features a VM implementation under 4,000 semicolons, a single-pass compiler to tight bytecode, lightweight fibers for concurrency, and an easy-to-use C API. It compiles as C99, C++98 or later, has no dependencies, and a small standard library. The codebase is readable and lovingly commented. It is open-source under the MIT license.

Key Features

Small VM implementation under 4,000 semicolons
Fast single-pass compiler to tight bytecode
Class-based object model
Concurrency via lightweight fibers
Easy-to-use C API for embedding
No external dependencies
Small standard library
Compiles as C99, C++98 or later
Readable and lovingly-commented codebase

Pros & Cons

Pros
  • Small and readable codebase
  • Fast performance via single-pass compiler
  • Class-based object model familiar to many developers
  • Concurrent via fibers without threads
  • Easy embedding with C API
  • No dependencies, easy to integrate
  • MIT open-source license
Cons
  • Small standard library may require additional code for complex tasks
  • Primarily designed for embedding, not standalone application development
  • Smaller ecosystem compared to Lua or Python

Best For

Embedding scripting capabilities in applicationsApplication scripting and extension

FAQ

What is Wren?
Wren is a small, fast, class-based concurrent scripting language designed for embedding in applications. It is open-source under the MIT license.
How does Wren compare to Lua?
Wren is similar in size to Lua (VM under 4,000 semicolons) but adds classes and concurrency via fibers, while Lua uses tables and coroutines. Wren compiles to bytecode and has an easy C API.
Is Wren free to use?
Yes, Wren is open-source and released under the MIT license, allowing free use in personal and commercial projects.
What platforms does Wren support?
Wren compiles as C99, C++98 or later, so it can be used on any platform with a C or C++ compiler.