retoor eadfc8e9cb feat: add await syntax for direct async function calls and new generator/phonebook apps
Add compiler support for calling async functions directly with `await fn(args)` syntax, automatically translating to `await fn.call(args)`. Introduce `create_merge` Makefile target for merging Wren source files. Include new `apps/generator.wren` source code generator using OpenRouter API, `apps/phonebook.wren` CLI phonebook with SQLite backend, and `apps/minitut.md` Wren tutorial reference. Update `example/await_demo.wren` with parameterized async functions, nested awaits, and expression usage. Fix JSON parsing in `example/openrouter_demo.wren` to strip markdown code fences. Document new await syntax in `manual/api/scheduler.html`.
2026-01-25 09:50:20 +00:00

Wren-CLI

retoor retoor@molodetz.nl

A command-line interface and REPL for the Wren programming language. Built on libuv for asynchronous I/O with native support for HTTP/HTTPS, WebSockets, TLS, SQLite, JSON, regex, and more.

Prerequisites

  • C compiler (GCC or Clang)
  • Make
  • OpenSSL development libraries
  • Python 3 (for tests)

Build

git clone https://github.com/wren-lang/wren-cli.git
cd wren-cli
make build

Output binary: bin/wren_cli

Platform-Specific Builds

Platform Command
Linux make build
macOS cd projects/make.mac && make
FreeBSD cd projects/make.bsd && gmake

Test

make tests

Run a specific test suite:

python3 util/test.py json

Usage

bin/wren_cli script.wren    # Execute a script
bin/wren_cli                 # Start the REPL

Modules

Core: io, os, scheduler, timer, net, repl

Extended: json, env, math, base64, datetime, dns, signal, subprocess, crypto, regex, http, tls, sqlite, websocket, jinja, pathlib, tempfile, uuid

Documentation

See the manual/ directory for the full reference including API docs, tutorials, and how-to guides.

License

MIT

S
Description
Highly customized version of the wren programming language. It has all the modules that you would expect in a std library including http, websockets, sqlite3 and jinja-like templating engine. The idea is to make it suitable for web development.
Readme
22 MiB
Languages
HTML 50%
C 22.2%
PHP 13.4%
C++ 6%
Makefile 2.9%
Other 5.5%