wren

a classy little scripting language

Getting Started

Trying out the language #

If you’d like to try Wren, you have a few options.

Once you have somewhere to explore, it’s time to learn the language.


Embed the VM #

The Wren Virtual Machine is the core of the language that executes Wren source code. It is just a library, not a standalone application. It’s designed to be embedded in a larger host application.

It has no dependencies beyond the C standard library. You can use it as a static library, shared library, or simply compile the source into your app.

Building Wren #

To build the Wren library, we look inside the projects/ folder. In here you’ll find ready to go projects for Visual Studio, XCode and tools like make.

In each case, there will be library files generated into the root lib/ folder.
These are what you’ll link into your project, based on your needs.

Note that the default build will also generate wren_test inside of bin/,
a binary that is used to run the language tests. It can execute simple scripts.

Other platforms
If your platform isn’t explicitly supported, it is recommended that you include the Wren source in your project for a portable experience.

Including the code in your project #

all source files
The alternative to building via the provided projects is to include the wren source code in your project. Since it has no dependencies this is simple, all the code in src/ comes along. There’s a readme in src/ for details.

’amalgamated’ build
If you want an even simpler way, there’s an ‘amalgamated’ build (often called blob, or unity builds.). This is all of the wren source code in one file.

This file can be generated by running python3 util/generate_amalgamation.py > build/wren.c, which saves the generated output in build/wren.c.

Include build/wren.c and src/include/wren.h in your project code and you’re good to go. Ideally later we can automate generating this and include it in the repo.


If you run into bugs, or have ideas or questions, any of the following work: