Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 2.17 KB

README.md

File metadata and controls

59 lines (38 loc) · 2.17 KB

godot-cpp-m

godot-cpp 10.0.0 as C++23 modules, preserving godot:: APIs.

English · 简体中文 · Upstream · Releases · mcpp · Index

C++23 License mcpp-community CI

Modules

  • import mcpplibs.mwrap.godot_cpp;: godot:: math and GDExtension bindings
  • import mcpplibs.mwrap.godot_cpp.macros;: Version macro mappings

More Modules API -> Usage and API

Install

mcpp new godot_math --template mcpplibs.mwrap.godot_cpp@10.0.0
cd godot_math
mcpp run
[dependencies]
mcpplibs.mwrap.godot_cpp = "10.0.0"

Macros

Use .macros for version mappings. For GDCLASS, D_METHOD and memory/control macros, include <mwrap/godot_cpp/macros.hpp> before import mcpplibs.mwrap.godot_cpp;.

Example

import mcpplibs.mwrap.godot_cpp;
int main() { return godot::Vector2(3, 4).length() == 5 ? 0 : 1; }

The default template uses standalone math. Summator builds a shared GDExtension; loading needs a matching engine.

Regenerating the module

Use tools/gen_module_cppm.py with the exact compat.godot-cpp source and generated headers; see usage.

Tests

mcpp test covers module/math and textual macros; CI also builds the extension on Linux/macOS/Windows. Uses the upstream-default Godot 4.7 API; engine loading requires a matching runtime.

License

Apache-2.0; compat.godot-cpp carries upstream sources, generated bindings and notices.

Wrapper: Apache-2.0, mcpp-community. Original upstream README and licenses. Upstream licenses remain unchanged.