Crate gdnative_core
source ·Expand description
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.
Modules
Object class hierarchyMacros
Site value from the current position in code,
optionally with a function path for identification.Method implementor
that can be passed to the engine when registering a class.