godot-sandbox
In-editor scripting and sandboxing for Godot 4.4+
Godot Sandbox runs untrusted scripts safely inside the Godot engine
Godot Sandbox lets game makers run mods and user generated content in a memory safe sandbox using a safe GDScript dialect, with C++ and Rust options.
SafeGDScript and the sandbox model
Godot Sandbox lets players run untrusted code safely inside the Godot game engine. Developers write gameplay in SafeGDScript, a safe GDScript dialect executed inside a memory safe sandbox with limits and execution timeouts. A restricted program cannot reach the host beyond what you explicitly allow, which makes it safe to load mods, user generated content, and scripts from other players. The project states that all Godot platforms are supported. SafeGDScript uses most of the same syntax as GDScript and adds a few things such as structs, and you attach a .sgd file to a node the same way you would attach a .gd script. The README shows inventory and cutscene examples, including support for await so a host can receive a signal and await it like any other coroutine. For modding, a restricted sandbox denies all host access by default: methods, properties, classes, and resource loading are blocked until the developer passes an explicit API dictionary. The mod then calls only the functions the host granted, which keeps a hostile mod from touching anything the developer did not expose. The examples include a mod loader with a hostile mod audit, showing how the grant based model contains untrusted code at runtime.
C++, Rust, and performance
For maximum performance, sandboxed programs can also be written in C++ or Rust, and the README says they use the same sandbox and the same restrictions as SafeGDScript. The project links a code examples repository and a demo repository for these languages. On performance, the documentation claims sandboxed C++ is 2.5 to 10 times faster than GDScript by default, and 5 to 50 times faster with binary translation. Full binary translation can be enabled for maximum performance on all platforms, including locked down targets such as iOS, Web, and Switch. JIT builds are available in the Releases section for Windows, macOS, Android, and Linux. There are two common usage patterns: assign an ELF script resource directly to a node, which builds a shared sandbox among all instances with that script for maximum scalability, or create a Sandbox node and assign the ELF resource to it for one sandbox per node with auto completion from other GDScripts through export. Both paths let you call functions and attach signals the way you would with ordinary GDScript. The performance headroom matters for games that run many scripted entities, where the sandbox overhead would otherwise dominate the frame budget. The README notes that sandboxed C++ can reach 5 to 50 times the speed of GDScript with binary translation, which is what makes the sandbox viable for performance sensitive gameplay code.
Installation and building
Installation is straightforward. The recommended path is to download the plugin from the official Godot Asset Store using the AssetLib tab in Godot and searching for Godot Sandbox. The manual path is to download the latest GitHub release and move only the addons folder into your project's addons folder. The project is built by the libriscv team and is documented on the libriscv site, with a GodotCon 2024 presentation linked from the README. To build it as a module, you add the repository as a git submodule under modules/sandbox in a Godot source tree and run the recursive submodule update, then build with the provided build.sh or with scons in the same way other godot cpp addons are built. Contributing requires SCons and python3. The README credits several contributors and follows the all contributors specification, welcoming contributions of any kind. A related project mentioned is the Jenova Framework, which has a built in C++ compiler and supports writing C++ in the Godot editor with hot reloading, showing the broader interest in scripting inside Godot. The plugin approach keeps the sandbox usable without patching the engine, which lowers the barrier for mod authors. Building as a module follows the same scons steps used by other godot cpp addons, so teams already compiling Godot from source can drop the sandbox in without a separate toolchain.
Editorial conclusion
Godot Sandbox is released under the BSD 3 Clause license and, at the time of writing, the repository recorded 464 stars and was last updated on 2026-08-24.
Community notes