{"id":13441735,"url":"https://github.com/godotengine/godot-cpp","last_synced_at":"2026-01-08T15:18:12.474Z","repository":{"id":37038123,"uuid":"83732863","full_name":"godotengine/godot-cpp","owner":"godotengine","description":"C++ bindings for the Godot script API","archived":false,"fork":false,"pushed_at":"2024-10-29T13:36:28.000Z","size":13304,"stargazers_count":1725,"open_issues_count":326,"forks_count":570,"subscribers_count":51,"default_branch":"master","last_synced_at":"2024-10-29T14:31:45.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/godotengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://fund.godotengine.org/"}},"created_at":"2017-03-02T22:50:13.000Z","updated_at":"2024-10-29T13:36:33.000Z","dependencies_parsed_at":"2023-10-16T06:39:24.275Z","dependency_job_id":"2d58918f-a6be-4452-b848-ffc6a96a9fd7","html_url":"https://github.com/godotengine/godot-cpp","commit_stats":{"total_commits":864,"total_committers":145,"mean_commits":5.958620689655173,"dds":0.8796296296296297,"last_synced_commit":"d47758910428242169ebe59329b449edf16036e0"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godotengine","download_url":"https://codeload.github.com/godotengine/godot-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243496,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:37.503Z","updated_at":"2026-01-08T15:18:12.462Z","avatar_url":"https://github.com/godotengine.png","language":"C++","funding_links":["https://fund.godotengine.org/"],"categories":["C++"],"sub_categories":[],"readme":"# godot-cpp\n\n\u003e [!WARNING]\n\u003e\n\u003e This repository's `master` branch is only usable with\n\u003e [GDExtension](https://godotengine.org/article/introducing-gd-extensions)\n\u003e from Godot's `master` branch.\n\u003e\n\u003e For users of stable branches, switch to the branch matching your target Godot version:\n\u003e - [`4.5`](https://github.com/godotengine/godot-cpp/tree/4.5)\n\u003e - [`4.4`](https://github.com/godotengine/godot-cpp/tree/4.4)\n\u003e - [`4.3`](https://github.com/godotengine/godot-cpp/tree/4.3)\n\u003e - [`4.2`](https://github.com/godotengine/godot-cpp/tree/4.2)\n\u003e - [`4.1`](https://github.com/godotengine/godot-cpp/tree/4.1)\n\u003e - [`4.0`](https://github.com/godotengine/godot-cpp/tree/4.0)\n\u003e\n\u003e Or check out the Git tag matching your Godot version (e.g. `godot-4.1.1-stable`).\n\u003e\n\u003e For GDNative users (Godot 3.x), switch to the [`3.x`](https://github.com/godotengine/godot-cpp/tree/3.x)\n\u003e or the [`3.5`](https://github.com/godotengine/godot-cpp/tree/3.5) branch.\n\nThis repository contains the  *C++ bindings* for the [**Godot Engine**](https://github.com/godotengine/godot)'s GDExtensions API.\n\n- [**Versioning**](#versioning)\n- [**Compatibility**](#compatibility)\n- [**Contributing**](#contributing)\n- [**Getting started**](#getting-started)\n- [**Examples and templates**](#examples-and-templates)\n\n## Versioning\n\nThis repositories follows the same branch versioning as the main [Godot Engine\nrepository](https://github.com/godotengine/godot):\n\n- `master` tracks the current GDExtension development branch for the next Godot\n  4.x minor release.\n- `3.x` tracks the development of the GDNative plugin for the next 3.x minor\n  release.\n- Other versioned branches (e.g. `4.0`, `3.5`) track the latest stable release\n  in the corresponding branch.\n\nStable releases are also tagged on this repository:\n[**Tags**](https://github.com/godotengine/godot-cpp/tags).\n\n**For any project built against a stable release of Godot, we recommend using\nthis repository as a Git submodule, checking out the specific tag matching your\nGodot version.**\n\n\u003e As the `master` branch of Godot is constantly getting updated, if you are\n\u003e using `godot-cpp` against a more current version of Godot, see the instructions\n\u003e in the `gdextension` folder to update the relevant files.\n\n## Compatibility\n\nGDExtensions targeting an earlier version of Godot should work in later minor versions,\nbut not vice-versa. For example, a GDExtension targeting Godot 4.2 should work just fine\nin Godot 4.3, but one targeting Godot 4.3 won't work in Godot 4.2.\n\nThere is one exception to this: extensions targeting Godot 4.0 will _not_ work with\nGodot 4.1 and later.\nSee [Updating your GDExtension for 4.1](https://docs.godotengine.org/en/latest/tutorials/migrating/upgrading_to_godot_4.1.html#updating-your-gdextension-for-godot-4-1).\n\n## Contributing\n\nWe greatly appreciate help in maintaining and extending this project. If you\nwish to help out, please visit the [godot-cpp section of the Contributing docs](https://contributing.godotengine.org/en/latest/other/godot-cpp.html).\n\n## Getting started\n\nYou need the same C++ pre-requisites installed that are required for the `godot` repository. Follow the [official build instructions for your target platform](https://docs.godotengine.org/en/latest/engine_details/development/compiling/index.html).\n\nGetting started with GDExtensions is a bit similar to what it was for 3.x but also a bit different.\n\nThis new approach is much more akin to how core Godot modules are structured.\n\nCompiling this repository generates a static library to be linked with your shared lib,\njust like before.\n\nTo use the shared lib in your Godot project you'll need a `.gdextension`\nfile, which replaces what was the `.gdnlib` before.\nSee [example.gdextension](test/project/example.gdextension) used in the test project:\n\n```ini\n[configuration]\n\nentry_symbol = \"example_library_init\"\ncompatibility_minimum = \"4.1\"\n\n[libraries]\n\nmacos.debug = \"res://bin/libgdexample.macos.debug.framework\"\nmacos.release = \"res://bin/libgdexample.macos.release.framework\"\nwindows.debug.x86_64 = \"res://bin/libgdexample.windows.debug.x86_64.dll\"\nwindows.release.x86_64 = \"res://bin/libgdexample.windows.release.x86_64.dll\"\nlinux.debug.x86_64 = \"res://bin/libgdexample.linux.debug.x86_64.so\"\nlinux.release.x86_64 = \"res://bin/libgdexample.linux.release.x86_64.so\"\n# Repeat for other architectures to support arm64, rv64, etc.\n```\n\nThe `entry_symbol` is the name of the function that initializes\nyour library. It should be similar to following layout:\n\n```cpp\nextern \"C\" {\n\n// Initialization.\n\nGDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {\n\tgodot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);\n\n\tinit_obj.register_initializer(initialize_example_module);\n\tinit_obj.register_terminator(uninitialize_example_module);\n\tinit_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);\n\n\treturn init_obj.init();\n}\n}\n```\n\nThe `initialize_example_module()` should register the classes in ClassDB, very like a Godot module would do.\n\n```cpp\nusing namespace godot;\nvoid initialize_example_module(ModuleInitializationLevel p_level) {\n\tif (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {\n\t\treturn;\n\t}\n\tGDREGISTER_CLASS(Example);\n}\n```\n\nAny node and resource you register will be available in the corresponding `Create...` dialog. Any class will be available to scripting as well.\n\n## Examples and templates\n\nSee the [godot-cpp-template](https://github.com/godotengine/godot-cpp-template) project for a\ngeneric reusable template.\n\nOr checkout the code for the [Summator example](https://github.com/paddy-exe/GDExtensionSummator)\nas shown in the [official documentation](https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/gdextension_cpp_example.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodotengine%2Fgodot-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodotengine%2Fgodot-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodotengine%2Fgodot-cpp/lists"}