Skip to content

ReScripted 0.1.0 alpha

Pre-release
Pre-release

Choose a tag to compare

@Ace-codes-swift Ace-codes-swift released this 01 Sep 01:03
· 3 commits to main since this release

ReScripted 0.1.0-alpha

First public cut of ReScripted: a header-only C++17 library for building embeddable scripting languages.

This is an alpha. The engine runs a real subset of what the language JSON can describe. The schema is larger than the interpreter. Do not treat every template field as implemented.

What you get

  • One amalgamated header: include/ReScripted.h
  • Language configs compiled into your binary (Language::compile, RESCRIPTED_LANGUAGE, or rescripted_embed_language / scripts/embed_language.sh)
  • Scripts loaded, run, called, and unloaded at runtime — they are not compiled
  • Host bindings: bind, bind_type, bind_decorator
  • Custom declaration kinds in JSON (command, entity, @export, …)
  • Default helpers: print, len, str, type (print returns a string; bind your own for stdout)
  • CMake interface target ReScripted::ReScripted
  • Example: examples/mini/
  • Docs: user guide · agent handbook

What a script can do today

Expressions, let-style vars, fn / custom function kinds, if / while / for, arrays, maps from type blocks, host calls. Assignment is name = value only.

Not implemented yet (keys may still appear in the JSON): classes, imports, indentation-as-syntax, obj.x = 1 / a[0] = 1, closures over block locals, and most of the rest of the universal template.

Install

add_subdirectory(ReScripted)
target_link_libraries(your_app PRIVATE ReScripted::ReScripted)

Or copy include/ReScripted.h. C++17, CMake 3.16+.

#include <ReScripted.h>

rescripted::Engine engine;
engine.add_language(RESCRIPTED_LANGUAGE(R"({"name":"Mini","extensions":[".mini"]})"));
engine.eval("print(\"ok\");", "Mini");

Ask an agent to generate a full language JSON in your repo. Point it at docs/agents/.

License

LGPL-3.0-or-later. Proprietary apps may use the library; changes to ReScripted stay under the LGPL.

Contact: contact@atechsoftware.com