safe_wren

A nearly-complete implementation of the Wren language (wren.io) in Rust.

The original https://github.com/wren-lang/wren from wren.io is refered to as wren_c to disambiguate from this safe_wren.

Similaries to wren_c

Differences from wren_c

Usage

From an existing C project:

cargo build --release produces target/release/libsafe_wren.a and target/release/libsafe_wren.so which are drop-in replacements for wren.a and wren.so and compatible with wren.h found at (wren_c/src/include/wren.h).

From Rust:

Add a dependency to your cargo.toml, e.g.

[dependencies] safe_wren = "0.1.0"

Development

There are two binaries: - wren_test -- used for testing uses only public API - wren_debug -- used for debugging vm, uses private calls.

cargo run FILENAME_OR_STRING will run wren_test against a file or string.

cargo run --bin=wren_debug FILENAME_OR_STRING will run wren_debug

wren_debug sub-commands: tokenize Dumps token stream. compile Dumps compiler bytecode. interpret Similar to no arguments, excepts prints VM state after run.

python3 util/test.py will run the tests, including updating test_results/* with error text from any failed tests. test.py will also update test_results/passes.txt with the list of passing tests.

test_results/test_expectations.txt lists all currently skipped tests and why.

Work yet to do

Launch list?

Ordered goals?

Leads to pursue

Benchmarking notes

wren_c bugs