mcpp index

godotengine.godot-cpp-m

import

C++23 module package for godot-cpp (import godot_cpp) — Godot GDExtension API, C++ API unchanged

import godot_cpp;

Module name taken from the upstream manifest's own description.

mcpp add godotengine.godot-cpp-m@10.0.0-rc1

Usage

From this repository's own test project — built and run by CI, not written for the website.

// Behavioral test for the godotengine.godot-cpp-m 10.0.0-rc1 module package (Godot 4.6): godot-cpp's
// API reached with `import godot_cpp;` and no #include at all.
//
// The numbers are deliberately the same ones tests/examples/godot-cpp asserts
// through headers -- that member is the header spelling of this one, so a
// divergence here means the module re-export changed behaviour.
//
// Both halves can fail:
//   * Vector2::length(), Basis::orthonormalized(), Color::to_rgba32() and
//     AABB::get_volume() are DEFINED in compat.godot-cpp's src/variant/*.cpp,
//     so they only resolve if that dependency really compiled and linked.
//   * Node, Node2D, Node::PROCESS_MODE_*, godot::OK and Variant::OBJECT exist
//     only in the pre-generated gen/ tree.
//
// Not covered here, by nature: anything routed through the
// gdextension_interface_* function pointers (String, Array, class
// registration) needs a Godot process that has loaded the extension. The
// GDCLASS/macro shape is covered by the package's own test suite.

import std;
import godot_cpp;

// …

tests/examples/godot-cpp-module-v10/tests/godot_cpp_module_v10.cpp · project tests/examples/godot-cpp-module-v10

Build · upstream manifest

modules
godot_cpp
targets
godot-cpp-m (lib)
manifest version
10.0.0-rc1
dependencies
compat
source
https://raw.githubusercontent.com/mcpplibs/godot-cpp-m/v10.0.0-rc1/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
10.0.0-rc1 latest LinuxWindowsmacOS CN GLOBAL 895975f32456…
4.5.0 LinuxWindowsmacOS CN GLOBAL d91794f46ec4…