#godot #gd-native #game-engine #interface #reference #bindings #object

gdnative-core

The Godot game engine's gdnative core bindings

18 releases

0.11.3 Jan 30, 2023
0.11.0 Oct 2, 2022
0.10.0 Mar 19, 2022
0.9.3 Feb 3, 2021
0.1.0 Apr 11, 2017

#1565 in Game dev

Download history 47/week @ 2023-12-04 84/week @ 2023-12-11 81/week @ 2023-12-18 117/week @ 2023-12-25 119/week @ 2024-01-01 91/week @ 2024-01-08 90/week @ 2024-01-15 73/week @ 2024-01-22 52/week @ 2024-01-29 82/week @ 2024-02-05 84/week @ 2024-02-12 88/week @ 2024-02-19 223/week @ 2024-02-26 109/week @ 2024-03-04 126/week @ 2024-03-11 130/week @ 2024-03-18

595 downloads per month
Used in 31 crates (6 directly)

MIT license

1MB
15K SLoC

Rust bindings for the Godot game engine

This crate contains high-level wrappers around the core types of Godot Engine's GDNative API, and the NativeScript feature which enables Rust code to be used as scripts.

Memory management for core types

Wrappers for most core types expose safe Rust interfaces, and it's unnecessary to mind memory management most of the times. The exceptions are VariantArray and Dictionary, internally reference-counted collections with "interior mutability" in Rust parlance. These types are modelled using the "typestate" pattern to enforce that the official thread-safety guidelines. For more information, read the type-level documentation for these types.

Since it is easy to expect containers and other types to allocate a copy of their content when using the Clone trait, some types do not implement Clone and instead implement NewRef which provides a new_ref(&self) -> Self method to create references to the same collection or object.

Dependencies

~7–15MB
~221K SLoC