gmbt is a MoonBit script language integration for Godot implemented as a
real ScriptLanguageExtension/GDExtension, with a generated Godot SDK and a
generated runtime bridge.
The repository is organized around a production-oriented goal:
- author
.mbtscripts directly in Godot projects - let Godot load them as a first-class script language
- generate the Godot API surface from upstream data instead of hand-maintaining it
- keep runtime facade, host ABI, and generated SDK in sync
src/C++ host, script language, resource loader/saver, runtime parser, compiler bridge, and generated host-runtime include integration.tools/API pipeline, runtime policy, script compiler, validation scripts, and build helpers.generated/godot_api_pipeline/generated API catalog, generated editor SDK, runtime manifests, and generated host runtime.project/example Godot project used for end-to-end validation.project/mbt/: MoonBit example and probe scriptsproject/gmbt/: generated dependency module consumed by the sample projectproject/bin/gmbt.gdextension: extension manifest used by the sample project
docs/pipeline notes, architecture notes, and working documentation.godot-cpp/upstreamgodot-cppsubmodule.
- real
.mbtscript resources loaded by Godot #gmbt.base(...)#gmbt.tool#gmbt.class_name(...)#gmbt.signal(...)- exported properties for
Int,Double,Bool,String,Vector2,Vector3 - runtime method ABI for:
IntDoubleBoolStringVector2args/returnsVector3args/returns
- generated
Vector2/Vector3operator support inside the supported MoonBit boundary:+-*/- unary
- - equality/comparison traits
- Godot 4.6-compatible source/docs available locally
- MoonBit toolchain installed locally
- Visual Studio C++ build tools on Windows
godot-cppsubmodule initialized
Generate the Godot API pipeline and sync the sample project module:
python tools/build_godot_api_pipeline.py --godot-root C:/toolkit/godot --project-root D:/Dev/self/moonbitlang/gmbt/project --no-legacy-sdkBuild the extension:
scons platform=windows target=template_debug arch=x86_64Validate the generated editor SDK with official MoonBit tooling:
python tools/validate_generated_editor_sdk.pyValidate the sample project module:
cd project
moon checkThe sample Godot project lives in project/.
Its default scene is project/main.tscn, which loads a
real MoonBit script from project/mbt/main.mbt.
The repository also contains multiple headless probes used during development to validate runtime API calls, UI/control bindings, 3D bindings, reload behavior, script metadata, and method ABI coverage.
Two generated SDK views are kept in the repository:
- canonical generated editor SDK:
generated/godot_api_pipeline/editor_sdk - project-local generated dependency module used by the sample project:
project/gmbt/sdk/godot
Pipeline notes live in docs/godot_api_pipeline.md.
ci.ymlverifies representative builds on push and pull request.make_build.ymlproduces cross-platform artifacts for release packaging.
gmbt is distributed under the Apache License 2.0.
See LICENSE.md.
Third-party code and submodules such as godot-cpp/ keep their upstream
licenses.