# wren-lang/wren

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/wren-lang-wren).**

8,043 stars · 619 forks · Wren · MIT

## Links

- GitHub: https://github.com/wren-lang/wren
- Homepage: http://wren.io
- awesome-repositories: https://awesome-repositories.com/repository/wren-lang-wren.md

## Topics

`bytecode` `c` `fibers` `interpreter` `language` `scripting-languages` `wren`

## Description

Wren is an embeddable, class-based scripting language and bytecode interpreter. It provides a dependency-free virtual machine designed for integrating dynamic script execution into host applications via a C API.

The language is centered on a modern object-oriented model featuring inheritance, method overloading, and first-class functions. It utilizes a concurrent fiber runtime to manage lightweight, cooperatively scheduled execution paths without relying on operating system threads.

The project includes a comprehensive suite of object-oriented primitives, closure-based state capture, and a module import system with cyclic dependency resolution. Its performance is supported by single-pass bytecode compilation, fixed-offset field access, and tagged value storage to reduce memory overhead.

The virtual machine can be integrated into applications as a static or shared library, and the language can also be executed as a standalone binary tool via a command-line interface.

## Tags

### Programming Languages & Runtimes

- [Class-Based Scripting Languages](https://awesome-repositories.com/f/programming-languages-runtimes/class-based-scripting-languages.md) — Implements a small and fast object-oriented scripting language designed for embedding and concurrent task execution.
- [Single-Pass Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-compilation/single-pass-compilation.md) — Emits bytecode during a single parsing pass to minimize memory allocation and accelerate application startup. ([source](http://wren.io/performance.html))
- [Bytecode Interpreters](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-interpreters.md) — Implements a bytecode interpreter that runs compiled source code to produce output and verify logic. ([source](http://wren.io/try))
- [Bytecode Virtual Machines](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-virtual-machines.md) — Implements a custom virtual machine that executes a specialized instruction set for the language runtime.
- [C-Based Embedding APIs](https://awesome-repositories.com/f/programming-languages-runtimes/c-based-embedding-apis.md) — Provides a minimal C-based API for embedding the scripting engine and defining host functions within native applications.
- [Class System Implementations](https://awesome-repositories.com/f/programming-languages-runtimes/class-system-implementations.md) — Organizes execution around a core class system implementation with a modern object-oriented model. ([source](https://cdn.jsdelivr.net/gh/wren-lang/wren@main/README.md))
- [Bytecode Interpreters](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-infrastructure/compilers/bytecode-interpreters.md) — Provides an execution engine that compiles source code into bytecode in a single pass for fast startup.
- [Computed Goto Dispatch](https://awesome-repositories.com/f/programming-languages-runtimes/computed-goto-dispatch.md) — Uses computed gotos in the bytecode loop to create distinct branch points and reduce CPU pipeline stalls. ([source](http://wren.io/performance.html))
- [Embedded Script Execution](https://awesome-repositories.com/f/programming-languages-runtimes/embedded-script-execution.md) — Enables the execution of a scripting language runtime within a larger compiled host application.
- [Fixed-Offset Field Access](https://awesome-repositories.com/f/programming-languages-runtimes/fixed-offset-field-access.md) — Accesses object fields using fixed memory offsets to avoid expensive runtime hash table lookups. ([source](http://wren.io/performance.html))
- [Language Embedding](https://awesome-repositories.com/f/programming-languages-runtimes/language-embedding.md) — Provides a dependency-free scripting layer that can be embedded into existing software to allow user extensions.
- [Fiber-Based Schedulers](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/synchronization-primitives/channel-based-concurrency/fiber-based-schedulers.md) — Features a cooperative scheduler that manages lightweight fibers for concurrent operation without using OS threads. ([source](http://wren.io/concurrency.html))
- [Method Dispatch Optimizations](https://awesome-repositories.com/f/programming-languages-runtimes/method-dispatch-optimizations.md) — Copies inherited methods into subclasses during definition to eliminate walking the inheritance chain at runtime. ([source](http://wren.io/performance.html))
- [Object-Oriented Scripting](https://awesome-repositories.com/f/programming-languages-runtimes/object-oriented-scripting.md) — Uses a modern class-based model with inheritance and method overloading for organized state and behavior.
- [Primitive Types](https://awesome-repositories.com/f/programming-languages-runtimes/primitive-types.md) — Implements a set of basic built-in data types including booleans, floating-point numbers, and UTF-8 strings. ([source](http://wren.io/values.html))
- [Tagged Value Storage](https://awesome-repositories.com/f/programming-languages-runtimes/tagged-value-storage.md) — Stores numbers and booleans as unboxed values using tagging to reduce memory overhead and cache misses. ([source](http://wren.io/performance.html))
- [Arity-Based Method Overloading](https://awesome-repositories.com/f/programming-languages-runtimes/arity-based-method-overloading.md) — Supports defining multiple methods with the same name that perform different tasks based on the number of arguments. ([source](http://wren.io/method-calls.html))
- [Class Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/class-definitions.md) — Provides syntax and structure to define custom classes with methods, fields, and inheritance. ([source](http://wren.io/classes.html))
- [Class Inheritance](https://awesome-repositories.com/f/programming-languages-runtimes/class-inheritance.md) — Supports deriving new classes from existing ones to inherit methods and utilize super-calls. ([source](http://wren.io/classes.html))
- [Arity-Based Method Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-definitions/arity-based-method-definitions.md) — Defines named behaviors with support for arity-based overloading and specialized getters and setters. ([source](http://wren.io/classes.html))
- [CLI Script Execution](https://awesome-repositories.com/f/programming-languages-runtimes/cli-script-execution.md) — Provides a standalone binary tool to execute scripts directly from the command-line interface. ([source](http://wren.io/cli))
- [Collection Accessors](https://awesome-repositories.com/f/programming-languages-runtimes/collection-accessors.md) — Enables retrieving or assigning values in collection objects using bracket syntax mapped to method signatures. ([source](http://wren.io/method-calls.html))
- [Compile-Time Arity Validation](https://awesome-repositories.com/f/programming-languages-runtimes/compile-time-arity-validation.md) — Checks argument counts against method signatures at compile time to remove the need for runtime validation. ([source](http://wren.io/performance.html))
- [Computed Goto Dispatchers](https://awesome-repositories.com/f/programming-languages-runtimes/computed-goto-dispatchers.md) — Uses computed gotos in the bytecode loop to reduce CPU pipeline stalls and improve execution speed.
- [Direct Execution Transfers](https://awesome-repositories.com/f/programming-languages-runtimes/direct-execution-transfers.md) — Implements a peer-to-peer transfer of control between fibers to switch execution paths without a return stack. ([source](http://wren.io/concurrency.html))
- [Dynamic Method Invocation](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-method-invocation.md) — Allows calling functions on objects by evaluating a receiver and passing arguments to a method identified by name. ([source](http://wren.io/method-calls.html))
- [Fiber State Suspension](https://awesome-repositories.com/f/programming-languages-runtimes/fiber-state-suspension.md) — Allows pausing a fiber's execution at any point and resuming it from the exact same location. ([source](http://wren.io/concurrency.html))
- [First-Class Functions](https://awesome-repositories.com/f/programming-languages-runtimes/first-class-functions.md) — Treats functions as first-class objects that can be stored in variables and passed as arguments. ([source](http://wren.io/functions.html))
- [Flattened Method Dispatchers](https://awesome-repositories.com/f/programming-languages-runtimes/flattened-method-dispatchers.md) — Optimizes method resolution by flattening the inheritance hierarchy during class definition.
- [Function Objects](https://awesome-repositories.com/f/programming-languages-runtimes/function-objects.md) — Allows classes to respond to call requests, enabling objects to be used interchangeably with functions. ([source](http://wren.io/functions.html))
- [Block-Scoped Variable Declarations](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-definitions/variable-type-declarations/local-variable-declarations/block-scoped-variable-declarations.md) — Implements block-level scoping and explicit declarations to track data through a script. ([source](http://wren.io/variables.html))
- [Closure Captures](https://awesome-repositories.com/f/programming-languages-runtimes/local-variable-captures/closure-captures.md) — Maintains access to variables defined outside a local scope through closures to preserve state. ([source](http://wren.io/functions.html))
- [Module Import Systems](https://awesome-repositories.com/f/programming-languages-runtimes/module-import-systems.md) — Implements a system for loading and executing external source code to share variables across different parts of a program. ([source](http://wren.io/modularity.html))
- [Module Singleton State Management](https://awesome-repositories.com/f/programming-languages-runtimes/module-state-initializers/module-singleton-state-management.md) — Ensures a module is executed only once and reused across multiple imports to maintain a single copy of its state. ([source](http://wren.io/modularity.html))
- [Named Constructors](https://awesome-repositories.com/f/programming-languages-runtimes/named-constructors.md) — Provides named constructors to initialize object state during class instantiation. ([source](http://wren.io/classes.html))
- [Property Access Syntax](https://awesome-repositories.com/f/programming-languages-runtimes/object-property-interceptors/property-access-syntax.md) — Supports reading and writing object properties using assignment syntax or method signatures that omit parentheses. ([source](http://wren.io/method-calls.html))
- [Operator Method Mappings](https://awesome-repositories.com/f/programming-languages-runtimes/operator-method-mappings.md) — Implements prefix, infix, and range operators that map directly to method calls on operands. ([source](http://wren.io/method-calls.html))
- [Ordered Collections](https://awesome-repositories.com/f/programming-languages-runtimes/ordered-collections.md) — Provides built-in ordered collections that store mixed-type elements accessible by integer index. ([source](http://wren.io/lists.html))
- [Runtime Library Integrations](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-library-integrations.md) — Integrates a class-based concurrent language into host applications as either a static or shared library. ([source](http://wren.io))
- [Runtime Bytecode Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/runtime-bytecode-compilation.md) — Compiles source code strings into bytecode at runtime for execution within the fiber model. ([source](http://wren.io/embedding/))
- [Tagged Value Boxing](https://awesome-repositories.com/f/programming-languages-runtimes/tagged-value-boxing.md) — Reduces memory overhead and cache misses by storing booleans and numbers as tagged, unboxed values.

### Software Engineering & Architecture

- [Fiber-Based Concurrent Execution](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-task-execution/fiber-based-concurrent-execution.md) — Implements a concurrent runtime based on lightweight fibers and cooperative scheduling to handle asynchronous workflows.
- [Object-Oriented Programming](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/object-oriented-foundations/object-oriented-programming.md) — Employs a class-based model supporting inheritance, method overloading, and first-class functions.
- [Static and Instance Field Management](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/object-oriented-foundations/object-oriented-programming/instance-state-management/static-and-instance-field-management.md) — Stores data within objects using implicitly declared fields and static fields for class-level shared state. ([source](http://wren.io/classes.html))
- [Fiber Data Exchange](https://awesome-repositories.com/f/software-engineering-architecture/concurrency-synchronization-primitives/fiber-synchronization/fiber-data-exchange.md) — Enables passing values to fibers during invocation and receiving values back upon yielding. ([source](http://wren.io/concurrency.html))
- [Circular Dependency Resolution](https://awesome-repositories.com/f/software-engineering-architecture/dependency-resolution-engines/circular-dependency-resolution.md) — Supports mutual imports between modules by registering them before execution to prevent infinite loading loops. ([source](http://wren.io/modularity.html))
- [Host-Defined Module Resolvers](https://awesome-repositories.com/f/software-engineering-architecture/pluggable-module-loading/host-defined-module-resolvers.md) — Resolves module names into source code via a host-side function using the file system or bundled resources. ([source](http://wren.io/modularity.html))

### Development Tools & Productivity

- [Embeddable Scripting Engines](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/developer-tools/embeddable-scripting-engines.md) — Ships a dependency-free virtual machine with a C API for integrating dynamic script execution into host applications.
- [Command Line Interfaces](https://awesome-repositories.com/f/development-tools-productivity/command-line-interfaces.md) — Ships as a standalone binary tool that allows scripts to be executed from a command-line interface.

### Operating Systems & Systems Programming

- [Virtual Machines](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/virtualization-platforms/virtualization-technologies/virtual-machines.md) — Provides a virtual machine that can be integrated into applications via static libraries or direct source inclusion. ([source](http://wren.io/embedding))
- [Runtime Instance Isolation](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/virtualization-platforms/virtualization-technologies/virtual-machines/runtime-instance-isolation.md) — Creates independent runtime instances with custom configurations and output handlers for isolated script execution. ([source](http://wren.io/embedding/))

### Data & Databases

- [Field Offset Accessors](https://awesome-repositories.com/f/data-databases/pointer-based-navigation/offset-based-addressing/field-offset-accessors.md) — Implements fixed-offset field access to eliminate expensive hash table lookups for object properties.

### DevOps & Infrastructure

- [VM Runtime Environments](https://awesome-repositories.com/f/devops-infrastructure/virtual-machine-lifecycle-management/vm-runtime-environments.md) — Manages the initialization and destruction of virtual machine instances to control memory and execution state. ([source](http://wren.io/embedding))
