Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] Consider moving some/all of glib::wrapper to a proc macro #916

Open
jf2048 opened this issue Jan 21, 2023 · 2 comments
Open

[PROPOSAL] Consider moving some/all of glib::wrapper to a proc macro #916

jf2048 opened this issue Jan 21, 2023 · 2 comments
Labels

Comments

@jf2048
Copy link
Member

jf2048 commented Jan 21, 2023

Altogether these macros are huge, it is difficult to add features or refactor them. Every new argument must put through around 6-8 pattern matches to work, see for example some of the changes here: 3c41d6d

If we ever want to add support for lifetimes and PhantomData that will need to have all the macros changed again as per #610 (comment).

@sdroege
Copy link
Member

sdroege commented Jan 21, 2023

@GuillaumeGomez is talking about that since quite some time, just nobody got to it yet :)

@jf2048
Copy link
Member Author

jf2048 commented Feb 15, 2023

Tried out here cc620d4 but it seems around 15% - 20% slower than the macro_rules implementation. Not sure what the cause of the slowness is, if it is avoidable or if it is just overhead from the proc macro bridge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants