Repository navigation
Releases: Ace-codes-swift/ReScripted
Release list
0.2.0-alpha
0.2.0-alpha
Pre-release. Header-only C++17. #include <ReScripted.h>.
Scripts
import helpersloads another same-language file beside the importer. No host call.- Import syntax is config-driven: keywords (
import,#import,#banana), dotted names,bind_asnamespace 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_pluginregister 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 withimports.plugin_entryorset_plugin_entry. bind_module/add_moduleare 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
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, orrescripted_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(printreturns 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