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

Derive ToKserd internally #26

Open
2 tasks
kurtlawrence opened this issue Aug 28, 2019 · 0 comments
Open
2 tasks

Derive ToKserd internally #26

kurtlawrence opened this issue Aug 28, 2019 · 0 comments

Comments

@kurtlawrence
Copy link
Owner

It was originally intended to add #[derive(ToKserd)] to a defined struct or enum. Testing has shown this to increase compilation times as it has to expand the macro. Instead, it is proposed to derive the impl internally in code. This has the benefit of being compiled once inside papyrus but comes at the cost of maintainability.

  • Research how quote and syn can be used procedurally to generate code.
  • Implement inside papyrus.

Considerations:

  • This can be developed alongside kserd_derive, expose the relevant functions.
  • Initially develop to be run on each source code write, but could be memoized if noticeable performance improvements.
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

No branches or pull requests

1 participant