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

add a proc macro version #33

Merged
merged 5 commits into from
May 30, 2020
Merged

add a proc macro version #33

merged 5 commits into from
May 30, 2020

Conversation

csos95
Copy link
Contributor

@csos95 csos95 commented May 29, 2020

This fixes #13 and fixes #15.

@csos95
Copy link
Contributor Author

csos95 commented May 30, 2020

I just realized that this proc macro doesn't support using a custom cache type.
I'll add more attributes to support this and a proc macro version of the kitchen_sink example

  • type = "Type" - set cache type
  • create = "Block" - set cache creation block

Like with the key and convert attributes, it's going to have to be strings that get parsed separately.

@jaemk
Copy link
Owner

jaemk commented May 30, 2020

This is awesome, thank you!

@csos95
Copy link
Contributor Author

csos95 commented May 30, 2020

Okay, I got those added. I will add some documentation to the proc macro and then this should be good to go.

@csos95
Copy link
Contributor Author

csos95 commented May 30, 2020

I added the documentation and since adding proc macros can sometimes increase compile time by quite a bit if there aren't already dependencies using them, I added it as a default feature.
If someone wants to use this without the overhead of compiling syn they can add default-features = false to the dependency.

@jaemk
Copy link
Owner

jaemk commented May 30, 2020

Nice, thanks! I'll upload a new release later today

@jaemk jaemk merged commit 497e0d8 into jaemk:master May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

macro: pub fn is not supported Proc macro based version
2 participants