Skip to content

Releases: Ace-codes-swift/ReScripted

0.2.0-alpha

0.2.0-alpha Pre-release
Pre-release

Choose a tag to compare

@Ace-codes-swift Ace-codes-swift released this 05 Sep 22:41

0.2.0-alpha

Pre-release. Header-only C++17. #include <ReScripted.h>.

Scripts

  • import helpers loads another same-language file beside the importer. No host call.
  • Import syntax is config-driven: keywords (import, #import, #banana), dotted names, bind_as namespace or flatten, standard_library.automatically_imported.
  • Search order for unregistered files: importer directory, working directory, imports.search_directories, add_search_path.

Host libraries

  • add_library / add_library_file / load_plugin register C++, bundled scripts, disk scripts, best-effort headers, or workshop plugins (.dll / .dylib / .so).
  • CMake only compiles sources. The host chooses every import name.
  • Plugin entry defaults to rescripted_register(Engine&). Override with imports.plugin_entry or set_plugin_entry.
  • bind_module / add_module are removed.

Language JSON

  • Type-first functions, typed parameters, classes/actors with methods and single inheritance, compound assignment, optional-brace if.

See CHANGELOG.md and docs/user/libraries.md.

ReScripted 0.1.0 alpha

Pre-release

Choose a tag to compare

@Ace-codes-swift Ace-codes-swift released this 01 Sep 01:03

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