<!-- Page: https://rustic-game-engine.pages.dev/docs/scripting/cpp -->

# Scripting Rustic games with C++

C++ uses the built-in Rustic API, like every gameplay language. Rustic supplies `rustic.hpp`,
compiles each `.cc`, `.cpp`, or `.cxx` behavior as C++20, and runs one isolated
process per instance. The header parses protocol requests and exposes typed native
helpers, so ordinary game code should not emit JSON.

Install `clang++`, `g++`, or MSVC `cl` on `PATH`. On Windows, Rustic also checks
the saved system/user PATH and registered or standard LLVM install folders; press
**Play** after installation to recheck without reinstalling LLVM. A custom compiler
folder can be added to the saved user/system PATH. Clang/GCC builds use `-Wall
-Wextra -Werror -std=c++20`; MSVC uses `/nologo /W4`. The editor also writes an
IntelliSense copy to `.rustic/generated/programming/rustic.hpp`, but Rustic supplies
the authoritative temporary copy when building. Never edit or vendor the generated
header.


## Topics

- [Complete behavior](https://rustic-game-engine.pages.dev/markdown/scripting/cpp/complete-behavior.md)
- [Typed API](https://rustic-game-engine.pages.dev/markdown/scripting/cpp/typed-api.md)
- [Scene and object operations](https://rustic-game-engine.pages.dev/markdown/scripting/cpp/scene-and-object-operations.md)
- [Lifetime, safety, and compatibility](https://rustic-game-engine.pages.dev/markdown/scripting/cpp/lifetime-safety-and-compatibility.md)

## Related guides

- [Edit scene objects](https://rustic-game-engine.pages.dev/markdown/guides/scene-objects.md)
- [Use gameplay actions](https://rustic-game-engine.pages.dev/markdown/guides/gameplay-actions.md)
