Consumer workflow
You are almost never working inside the ReScripted git repo.
The loop
- Developer added
ReScripted.h(oradd_subdirectory(ReScripted)) to their C++ project. - They ask you to invent or clone a language.
- You open this GitHub documentation (
docs/agents/). - You write the language JSON in their tree.
- You embed that JSON into their program (string literal or generated header).
- You add host
binds they asked for. - You add example scripts next to their game/tool, not in ReScripted.
their-app/
src/main.cpp # #include <ReScripted.h>
languages/mylang.json # compiled in
languages/mylang.hpp # optional generated embed header
scripts/hello.mylang # runtime only
Names are suggestions. Ask the user if they already have a folder convention. Prefer lowercase filenames. The display name stays in JSON "name".
What you must not do
- Clone ReScripted just to dump
languages/foo.jsoninto it. - Edit
include/ReScripted.hby hand (it is generated). - Change
docs/agents/language_template.jsonwhile “just making a language.” - Assume
./scripts/build.shexists in the user’s app. That script is for ReScripted itself. - Put the only copy of the language JSON on disk and tell them to
Language::compilefrom a path unless they explicitly read the file and pass the bytes. The supported product path is: JSON is compiled into the binary.
If you really are in the ReScripted repository
You are maintaining the library. Follow the root AGENTS.md. Do not add third-party user languages. Example Mini lives in examples/mini/ only as a demo of embedding.