Crate gdnative_derive

source ·

Macros

Convenience macro to wrap an object’s method into a Method implementor that can be passed to the engine when registering a class.

Attribute Macros

Collects method signatures of all functions in a NativeClass that have the #[method] attribute and registers them with Godot.
Wires up necessary internals for a concrete monomorphization of a generic NativeClass, represented as a type alias, so it can be registered.
Makes a function profiled in Godot’s built-in profiler. This macro automatically creates a tag using the name of the current module and the function by default.

Derive Macros

Enable struct types to be parsed as argument lists.
Makes it possible to use a type as a NativeScript. Automatically registers the type if the inventory feature is enabled on supported platforms.