{"id":20128602,"url":"https://github.com/redot-engine/redot-cpp","last_synced_at":"2025-07-23T09:08:15.655Z","repository":{"id":257935661,"uuid":"865122984","full_name":"Redot-Engine/redot-cpp","owner":"Redot-Engine","description":"C++ bindings for the Redot script API","archived":false,"fork":false,"pushed_at":"2025-04-23T06:09:07.000Z","size":14409,"stargazers_count":57,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T04:09:25.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"godotengine/godot-cpp","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Redot-Engine.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,"zenodo":null}},"created_at":"2024-09-30T02:35:34.000Z","updated_at":"2025-04-23T05:59:49.000Z","dependencies_parsed_at":"2025-02-06T00:26:18.116Z","dependency_job_id":"649b07b8-95fc-4ce2-9d11-55d1f879a1d0","html_url":"https://github.com/Redot-Engine/redot-cpp","commit_stats":null,"previous_names":["redot-engine/redot-cpp"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/Redot-Engine/redot-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redot-Engine%2Fredot-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redot-Engine%2Fredot-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redot-Engine%2Fredot-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redot-Engine%2Fredot-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Redot-Engine","download_url":"https://codeload.github.com/Redot-Engine/redot-cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redot-Engine%2Fredot-cpp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266649176,"owners_count":23962181,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-13T20:28:17.427Z","updated_at":"2025-07-23T09:08:15.623Z","avatar_url":"https://github.com/Redot-Engine.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redot-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 Redot's `master` branch.\n\nThis repository contains the  *C++ bindings* for the [**Redot Engine**](https://github.com/Redot-Engine/redot-engine)'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 [Redot Engine\nrepository](https://github.com/Redot-Engine/redot-engine):\n\n- `master` tracks the current GDExtension development branch for the next Redot\n  4.x minor release.\n- Other versioned branches (e.g. `4.3`) track the latest stable release\n  in the corresponding branch.\n\nStable releases are also tagged on this repository:\n[**Tags**](https://github.com/Redot-Engine/redot-cpp/tags).\n\n**For any project built against a stable release of Redot, we recommend using\nthis repository as a Git submodule, checking out the specific tag matching your\nRedot version.**\n\n\u003e As the `master` branch of Redot is constantly getting updated, if you are\n\u003e using `redot-cpp` against a more current version of Redot, see the instructions\n\u003e in the `gdextension` folder to update the relevant files.\n\n## Compatibility\n\n\u003e [!WARNING]\n\u003e\n\u003e The GDExtension API is brand new since Godot 4.0, and is still\nconsidered in **beta** stage, despite Redot 4.3 itself being released.\n\u003e\n\u003e This applies to both the GDExtension interface header, the API JSON, and this\nfirst-party `redot-cpp` extension.\n\u003e\n\u003e Some compatibility breakage is to be expected as GDExtension and `redot-cpp`\n\u003e get more used, documented, and critical issues get resolved. See the\n\u003e [Redot issue tracker](https://github.com/Redot-Engine/redot-engine/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%3Agdextension),\n\u003e the [Godot issue tracker](ttps://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%3Agdextension),\n\u003e the [godot-cpp issue tracker](https://github.com/godotengine/godot-cpp/issues),\n\u003e and the [redot-cpp issue tracker](https://github.com/Redot-Engine/redot-cpp/issues)\n\u003e for a list of known issues, and be sure to provide feedback on issues and PRs\n\u003e which affect your use of this extension.\n\n## Contributing\n\nWe greatly appreciate help in maintaining and extending this project. If you\nwish to help out, ensure you have an account on GitHub and create a \"fork\" of\nthis repository. See [Pull request workflow](https://docs.redotengine.org/en/stable/community/contributing/pr_workflow.html)\nfor instructions.\n\nPlease install clang-format and the [pre-commit](https://pre-commit.com/) Python framework so formatting is done before your changes are submitted. See the [code style guidelines](https://docs.godotengine.org/en/latest/contributing/development/code_style_guidelines.html#pre-commit-hook) for instructions.\n\n## Getting started\n\nYou need the same C++ pre-requisites installed that are required for the `redot-engine` repository. Follow the [official build instructions for your target platform](https://docs.redotengine.org/en/latest/contributing/development/compiling/index.html#building-for-target-platforms).\n\nGetting started with GDExtensions is a bit similar to what it was for Godot 3.x but also a bit different.\n\nThis new approach is much more akin to how core Redot 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 Redot 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 Redot 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 [redot-cpp-template](https://github.com/Redot-Engine/redot-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.redotengine.org/en/latest/tutorials/scripting/gdextension/gdextension_cpp_example.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredot-engine%2Fredot-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredot-engine%2Fredot-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredot-engine%2Fredot-cpp/lists"}