gd-resource-derive

Crates.iogd-resource-derive
lib.rsgd-resource-derive
version0.3.0
created_at2025-08-06 20:09:20.204631+00
updated_at2025-08-08 02:58:26.092349+00
descriptionproc macro that does `impl into<$YOUR_STRUCT> for godot::prelude::Resource`
homepage
repositoryhttps://github.com/eric-ene/gd-resource-derive
max_upload_size
id1784272
size11,296
Eric Ene (eric-ene)

documentation

README

Eric's Godot Resource Derive Macro

Derive macro for my specific use case:

  • Working on a Godot project with Rust
  • Resources written in gdscript, with Corresponding structs on the Rust side
  • Too lazy to write:
    • impl Into<$TYPE> for Resource
    • impl GodotConvert for $TYPE
    • impl FromGodot for $TYPE
    • every time

Known wacky edge cases:

  • If your struct is a GodotClass with a base of Resource (i.e. if your resource is written in rust), I'm pretty sure the macro fails.
    • But also, I don't think you'd need this crate in that case?
Commit count: 0

cargo fmt