Builder API to register classes, functions, properties, signals · Issue #4 · godot-rust/gdext (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Functionality that is currently available through proc-macros should ideally be exposed in a programmatic builder API, too.
Some challenges:
- The proc-macros combined with the plugin system detect very fine-grained customization, e.g. every single method in
GodotExt
.- This would have to be manually annotated in a builder, possibly using static type information (generic arguments).
- Some of the traits and functions generated by proc-macros are internal.
- The builder API could be more high-level and stable.
- Functions are rather verbose to register through builders, with generic-tuples. Think about ways to provide a simple interface.
- In GDNative, this was done via
Method
trait, which is very flexible and general, but required full implementation for every single type. This might serve as a basis, with more higher-level concretizations.
- In GDNative, this was done via