{"id":13474028,"url":"https://github.com/godot-rust/gdnative","last_synced_at":"2025-05-14T14:08:40.565Z","repository":{"id":37630578,"uuid":"87864150","full_name":"godot-rust/gdnative","owner":"godot-rust","description":"Rust bindings for Godot 3","archived":false,"fork":false,"pushed_at":"2024-09-09T08:53:33.000Z","size":7959,"stargazers_count":3634,"open_issues_count":63,"forks_count":212,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-05-07T15:19:46.209Z","etag":null,"topics":["game-development","gamedev","godot","rust"],"latest_commit_sha":null,"homepage":"https://godot-rust.github.io","language":"Rust","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/godot-rust.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-10T22:41:13.000Z","updated_at":"2025-04-24T23:49:52.000Z","dependencies_parsed_at":"2022-07-13T15:29:42.862Z","dependency_job_id":"f97ed962-ed6e-4d64-af96-4bedb7887d2f","html_url":"https://github.com/godot-rust/gdnative","commit_stats":{"total_commits":957,"total_committers":84,"mean_commits":"11.392857142857142","dds":0.7387669801462905,"last_synced_commit":"ea72d5914cd50ebb9fd26821a592035bc86f97b7"},"previous_names":["godot-rust/godot-rust","godotnativetools/godot-rust"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godot-rust%2Fgdnative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godot-rust%2Fgdnative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godot-rust%2Fgdnative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godot-rust%2Fgdnative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godot-rust","download_url":"https://codeload.github.com/godot-rust/gdnative/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253730053,"owners_count":21954747,"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":["game-development","gamedev","godot","rust"],"created_at":"2024-07-31T16:01:08.950Z","updated_at":"2025-05-14T14:08:40.515Z","avatar_url":"https://github.com/godot-rust.png","language":"Rust","readme":"# GDNative bindings for Rust\n\n\u003ca href=\"https://godot-rust.github.io/\"\u003e\u003cimg align=\"right\" width=\"200\" height=\"200\" src=\"assets/godot-ferris.svg\"\u003e\u003c/a\u003e\n\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/gdnative?logo=rust\u0026color=A6854D\" /\u003e](https://crates.io/crates/gdnative)\n[\u003cimg alt=\"stable docs\" src=\"https://img.shields.io/badge/docs-released-4D8AA6?\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\" /\u003e](https://docs.rs/gdnative)\n[\u003cimg alt=\"master docs\" src=\"https://img.shields.io/badge/docs-master-4D8AA6?\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\" /\u003e](https://godot-rust.github.io/docs)\n[\u003cimg alt=\"book\" src=\"https://img.shields.io/badge/user_guide-book-3e6ccf?\u0026logo=read-the-docs\u0026logoColor=white\" /\u003e](https://godot-rust.github.io/book)\n[\u003cimg alt=\"website\" src=\"https://img.shields.io/badge/website-3e6ccf?\u0026color=gray\" /\u003e](https://godot-rust.github.io)\n\n**godot-rust** is a Rust library that implements native bindings for the [Godot game engine](http://godotengine.org/). This allows you to develop games or other applications in Godot, while benefiting from Rust's strengths, such as its type system, scalability and performance.\n\n\u003e **Note**: if you are looking for a Rust binding for GDExtension (Godot 4), checkout [`gdext`](https://github.com/godot-rust/gdext).\n\n## Maintenance Policy\n\n\u003e [!Important]  \n\u003e At the moment, `gdnative` is no longer actively maintained. Almost all development resources from the godot-rust project are invested in\n\u003e [`gdext`](https://github.com/godot-rust/gdext), which still requires a ton of work. If you are interested in assisting with `gdnative`\n\u003e maintenance, please contact us via e-mail or on Discord.\n\n`gdnative` is considered mostly feature complete, and lies a focus on API stability. We try to avoid unnecessary breaking changes, and try to limit their end-user impact to a minimum whenever we have to make them. No large-scale features are planned anymore.\n\nWe adhere to [Cargo's semantic versioning](https://doc.rust-lang.org/cargo/reference/semver.html) as the means to convey changes in the public API between versions. Future releases are planned publicly on GitHub, with the [milestone](https://github.com/godot-rust/gdnative/milestones) feature. Note that we use the `breaking-change` label to indicate the existence of *any* technical breakage, regardless of the expected impact on end user programs.\n\nIf you are looking to contribute, but are not sure if what you want to do falls in the scope of the project and is permitted by our maintenance policy, feel free to [get in touch](CONTRIBUTING.md#communication) with the project maintainers before you start.\n\n## Toolchain compatibility\n\n`gdnative` currently has a minimum supported Rust version (MSRV) of **1.70**. We use the Rust 2021 Edition.\n\n\u003e **Warning**: **Linux users: Be aware of the source of your Godot binary!** Binary distributions of Godot using a container-based format may ship versions of dependencies that may not be compatible with GDNative libraries built directly from your base system. Examples of such formats include **Flatpak**, **Snap**, and **AppImage**.\n\u003e\n\u003e As of 2023, some package managers might silently install one of these instead of a normal package when Godot is requested, which can then cause bizarre compatibility issues with your GDNative libraries. We recommend using the official binaries from [godotengine.org](https://godotengine.org/download/3.x/linux) for both the editor and the export templates.\n\nDue to GDNative API not strictly following SemVer and some concepts not mapping 1:1 to Rust (default parameters),\nit is difficult for a godot-rust version to remain compatible with multiple Godot versions simultaneously.\n\nHowever, we support the latest stable Godot 3 minor release out-of-the-box, and allow to easily use custom engine\nversions using the `custom-godot` feature flag (see [below](#custom-builds)).\n\nCompatibility list:\n\n* Godot 3.5.1 (works with gdnative 0.11)\n* Godot 3.4 (works with gdnative 0.10, custom build for 0.11)\n* Godot 3.3 (custom build)\n* Godot 3.2 (custom build)\n\nThe bindings do _**not**_ support Godot 4. If you are looking for a Rust binding for GDExtension (Godot 4), checkout [`gdextension`](https://github.com/godot-rust/gdextension).\n\n## Getting started\n\nDetailed setup is explained in [the _Getting Started_ section of the book](https://godot-rust.github.io/book/getting-started.html). In case of problems, consider also reading the [FAQ](https://godot-rust.github.io/book/faq/configuration.html).\n\n### Latest released version\n\nThis is the recommended way of using godot-rust. After `bindgen` dependencies and a current Godot version are installed, add the `gdnative` crate as a dependency, and set the crate type to `cdylib`:\n\n```toml\n[dependencies]\ngdnative = \"0.11\"\n\n[lib]\ncrate-type = [\"cdylib\"]\n```\n\n### Latest GitHub version\n\nIf you would like to benefit from cutting-edge features and bugfixes, you can use the GitHub version. We have a relatively sophisticated CI and test suite for basic stability, but the GitHub version is typically more experimental and less battle-tested than a `crates.io` release. We also do not guarantee any SemVer compatibility here.\n\n```toml\n[dependencies]\ngdnative = { git = \"https://github.com/godot-rust/godot-rust.git\" }\n\n[lib]\ncrate-type = [\"cdylib\"]\n```\n\n### Custom builds\n\nTo use the bindings with a different Godot version or a custom build of the engine, see\n[Custom Godot builds](https://godot-rust.github.io/book/advanced-guides/custom-godot.html) in the user guide.\n\n### Async/yield support\n\nAsync support is a work-in-progress, with a low-level API available in `gdnative::tasks`, if the `async` feature is enabled on `gdnative`. See [this page](https://godot-rust.github.io/book/recipes/async-tokio.html) in the book for an introduction to use the async feature with Tokio.\n\n\n## Example\n\nA typical use case is to expose your own _Native Class_, a Rust API that can be invoked from the Godot engine. The resulting native script can be attached to the scene tree, just like GDScript (`.gd` files). \n\nThis happens via dynamic libraries and the _GDNative interface_, which will be loaded from Godot. The necessary wiring is done behind the scenes by godot-rust. A simple \"Hello world\" application could look like this:\n\n```rust\nuse gdnative::prelude::*;\n\n#[derive(NativeClass)]\n#[inherit(Node)]\npub struct HelloWorld;\n\n#[methods]\nimpl HelloWorld {\n    fn new(_base: \u0026Node) -\u003e Self {\n        HelloWorld\n    }\n\n    #[method]\n    fn _ready(\u0026self, #[base] _base: \u0026Node) {\n        godot_print!(\"Hello, world.\");\n    }\n}\n\nfn init(handle: InitHandle) {\n    handle.add_class::\u003cHelloWorld\u003e();\n}\n\ngodot_init!(init);\n```\n\n### Further examples\n\n\u003e **Important note:**\n\u003e\n\u003e To run or edit an example, you need to build the native library for it first. Otherwise, the project will be broken. You can do so manually with `cargo build`, or use the `example.sh` shell script for convenience: `./example.sh run hello-world` or `./example.sh edit hello-world` for the editor.\n\nThe [/examples](https://github.com/godot-rust/godot-rust/tree/master/examples) directory contains several ready to use examples, complete with Godot projects and setup for easy compilation from Cargo:\n\n- [**hello-world**](https://github.com/godot-rust/godot-rust/tree/master/examples/hello-world) - Your first project, writes to the console.\n- [**spinning-cube**](https://github.com/godot-rust/godot-rust/tree/master/examples/spinning-cube) - Spin our own node in place, exposing editor properties.\n- [**scene-create**](https://github.com/godot-rust/godot-rust/tree/master/examples/scene-create) - Load, instance and place scenes using Rust code.\n- [**builder-export**](https://github.com/godot-rust/godot-rust/tree/master/examples/builder-export) - Export using the builder API.\n- [**property-export**](https://github.com/godot-rust/godot-rust/tree/master/examples/property-export) - Export complex properties such as collections.\n- [**dodge-the-creeps**](https://github.com/godot-rust/godot-rust/tree/master/examples/dodge-the-creeps) - A Rust port of the [little Godot game](https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html).\n- [**signals**](https://github.com/godot-rust/godot-rust/tree/master/examples/signals) - Connect and emit signals.\n- [**resource**](https://github.com/godot-rust/godot-rust/tree/master/examples/resource) - Create and use custom resources.\n- [**rpc**](https://github.com/godot-rust/godot-rust/tree/master/examples/rpc) - Simple peer-to-peer networking.\n- [**native-plugin**](https://github.com/godot-rust/godot-rust/tree/master/examples/native-plugin) - Create custom node plugins.\n\nAt startup, the Godot editor tries to load all resources used by the project, including the native library. If the latter isn't present, the editor will skip properties or signals associated with the missing native scripts in the scene. This causes the scene tree to be non-functional for any sample that relies on properties or signals configured in the editor.\n### Third-party projects\n\nTo see a list of games and integrations developed on top of godot-rust, have a look at our list of [third-party projects](https://godot-rust.github.io/book/projects.html) in the book.\n\n\n## Contributing\n\nSee the [contribution guidelines](CONTRIBUTING.md).\n\n\n## License\n\nAny contribution submitted for inclusion in the work by you shall be licensed under the [MIT license](LICENSE.md), without any additional terms or conditions.\n","funding_links":[],"categories":["Rust","Libraries","库 Libraries","Game Engines"],"sub_categories":["Game development","游戏开发 Game development"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodot-rust%2Fgdnative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodot-rust%2Fgdnative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodot-rust%2Fgdnative/lists"}