[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5772":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},5772,"gdext","godot-rust\u002Fgdext","godot-rust","Rust bindings for Godot 4","https:\u002F\u002Fbsky.app\u002Fprofile\u002Fgodot-rust.bsky.social",null,"Rust",4867,298,34,59,0,19,103,7,29.43,"Mozilla Public License 2.0",false,"master",[25,26,27,28],"game-development","gamedev","godot","rust","2026-06-12 02:01:14","![logo.png](misc\u002Fassets\u002Fgodot-rust-ferris.png)\n\n# Rust bindings for Godot 4\n\n_**[Website]** | **[Book][book]** | **[API Docs]** | [Discord] | [BlueSky] | [Mastodon] | [Twitter] | [Sponsor]_\n\n**godot-rust** is a library to integrate the Rust language with Godot 4.\n\n[Godot] is an open-source game engine, focusing on a productive and batteries-included 2D and 3D experience.  \nIts _GDExtension_ API allows integrating third-party languages and libraries.\n\n\n## Philosophy\n\nThe Rust binding is an alternative to GDScript, with a focus on type safety, scalability and performance.\nThe two languages can be mixed in a project, and your custom Rust APIs can be called type-safely from GDScript.\n\nThe primary goal of godot-rust is to provide a [**pragmatic Rust API**][philosophy] for game developers.\n\nRecurring workflows should be simple and require minimal boilerplate. APIs are designed to be safe and idiomatic Rust wherever possible.\nDue to interacting with Godot as a C++ engine, we sometimes follow unconventional approaches to provide a good user experience.\n\n\n## Motivating example\n\nThe following Rust snippet registers a Godot class `Player`, showcasing features such as inheritance, field initialization and signals.\n\n```rust\nuse godot::classes::{ISprite2D, ProgressBar, Sprite2D};\nuse godot::prelude::*;\n\n\u002F\u002F Declare the Player class inheriting Sprite2D.\n#[derive(GodotClass)]\n#[class(init, base=Sprite2D)] \u002F\u002F Automatic initialization, no manual init() needed.\nstruct Player {\n    \u002F\u002F Inheritance via composition: access to Sprite2D methods.\n    base: Base\u003CSprite2D>,\n\n    \u002F\u002F #[class(init)] above allows attribute-initialization of fields.\n    #[init(val = 100)]\n    hitpoints: i32,\n\n    \u002F\u002F Access to a child node, auto-initialized when _ready() is called.\n    #[init(node = \"Ui\u002FHealthBar\")] \u002F\u002F \u003C- Path to the node in the scene tree.\n    health_bar: OnReady\u003CGd\u003CProgressBar>>,\n}\n\n\u002F\u002F Implement Godot's virtual methods via predefined trait.\n#[godot_api]\nimpl ISprite2D for Player {\n    \u002F\u002F Override the `_ready` method.\n    fn ready(&mut self) {\n        godot_print!(\"Player ready!\");\n\n        \u002F\u002F Health bar is already initialized and straightforward to access.\n        self.health_bar.set_max(self.hitpoints as f64);\n        self.health_bar.set_value(self.hitpoints as f64);\n\n        \u002F\u002F Connect type-safe signal: print whenever the health bar is updated.\n        self.health_bar.signals().value_changed().connect(|hp| {\n            godot_print!(\"Health changed to: {hp}\");\n        });\n    }\n}\n\n\u002F\u002F Implement custom methods that can be called from GDScript.\n#[godot_api]\nimpl Player {\n    #[func]\n    fn take_damage(&mut self, damage: i32) {\n        self.hitpoints -= damage;\n        godot_print!(\"Player hit! HP left: {}\", self.hitpoints);\n\n        \u002F\u002F Update health bar.\n        self.health_bar.set_value(self.hitpoints as f64);\n\n        \u002F\u002F Call Node methods on self, via mutable base access.\n        if self.hitpoints \u003C= 0 {\n            self.base_mut().queue_free();\n        }\n    }\n}\n```\n\n\n## Development status\n\nThe library has evolved a lot since 2023 and is now in a usable state for projects such as games, editor plugins, tools and other applications\nbased on Godot. See [ecosystem] to get an idea of what users have built with godot-rust.\n\nKeep in mind that we occasionally introduce breaking changes, motivated by improved user experience or upstream changes. These are usually\nminor and accompanied by migration guides. Our [crates.io releases][crates-io] adhere to SemVer, but lag a bit behind the `master` branch.\nSee also [API stability] in the book.\n\nThe vast majority of Godot APIs have been mapped to Rust. The current development focus lies on a more natural Rust experience, to enable\ndesign patterns that come in handy for day-to-day game development. To counter bugs, we use an elaborate CI suite including clippy, unit tests,\nengine integration tests and memory sanitizers. Even hot-reload is tested!\n\nAt the moment, there is experimental support for [Wasm], [Android] and [iOS], but documentation and tooling is still lacking.\nContributions are very welcome!\n\n\n## Getting started\n\nThe best place to start is [the godot-rust book][book]. Use it in conjunction with our [API Docs].  \nWe also provide practical examples and small games in the [demo-projects] repository.\n\nIf you need help, join our [Discord] server and ask in the `#help` channel!\n\n\n## License\n\nWe use the [Mozilla Public License 2.0][mpl]. MPL tries to find a balance between permissive (MIT, Apache, Zlib) and copyleft licenses (GPL, LGPL).\n\nThe license provides a lot of freedom: you can use the library commercially and keep your own code closed-source,\ni.e. game development is not restricted. The main condition is that if you change godot-rust _itself_, you need to make\nthose changes available (and only those, no surrounding code).\n\n\n## Contributing\n\nContributions are very welcome! If you want to help out, see [`Contributing.md`](Contributing.md) for some pointers on getting started.\n\n[API Docs]: https:\u002F\u002Fgodot-rust.github.io\u002Fdocs\u002Fgdext\n[API stability]: https:\u002F\u002Fgodot-rust.github.io\u002Fbook\u002Ftoolchain\u002Fcompatibility.html#rust-api-stability\n[Android]: https:\u002F\u002Fgithub.com\u002Fgodot-rust\u002Fgdext\u002Fissues\u002F470\n[Discord]: https:\u002F\u002Fdiscord.gg\u002FaKUCJ8rJsc\n[Godot]: https:\u002F\u002Fgodotengine.org\n[BlueSky]: https:\u002F\u002Fbsky.app\u002Fprofile\u002Fgodot-rust.bsky.social\n[Mastodon]: https:\u002F\u002Fmastodon.gamedev.place\u002F@GodotRust\n[Sponsor]: https:\u002F\u002Fgithub.com\u002Fsponsors\u002FBromeon\n[Twitter]: https:\u002F\u002Ftwitter.com\u002FGodotRust\n[WASM]: https:\u002F\u002Fgodot-rust.github.io\u002Fbook\u002Ftoolchain\u002Fexport-web.html\n[Website]: https:\u002F\u002Fgodot-rust.github.io\n[`gdnative`]: https:\u002F\u002Fgithub.com\u002Fgodot-rust\u002Fgdnative\n[book]: https:\u002F\u002Fgodot-rust.github.io\u002Fbook\n[ecosystem]: https:\u002F\u002Fgodot-rust.github.io\u002Fbook\u002Fecosystem\n[demo-projects]: https:\u002F\u002Fgithub.com\u002Fgodot-rust\u002Fdemo-projects\n[iOS]: https:\u002F\u002Fgithub.com\u002Fgodot-rust\u002Fgdext\u002Fissues\u002F498\n[mpl]: https:\u002F\u002Fwww.mozilla.org\u002Fen-US\u002FMPL\n[philosophy]: https:\u002F\u002Fgodot-rust.github.io\u002Fbook\u002Fcontribute\u002Fphilosophy.html\n[crates-io]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Fgodot\n","godot-rust\u002Fgdext 是一个将 Rust 语言与 Godot 4 游戏引擎集成的库。它通过 GDExtension API 提供了对 Godot 的全面支持，使得开发者能够利用 Rust 的类型安全、可扩展性和高性能特性来编写游戏逻辑。该库允许在同一个项目中混合使用 GDScript 和 Rust，并且可以从 GDScript 中以类型安全的方式调用自定义的 Rust API。适合那些希望在保持 Godot 引擎易用性的同时，又能利用 Rust 语言优势进行游戏开发的场景。",2,"2026-06-11 03:05:00","top_language"]