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.
It was originally intended to add
#[derive(ToKserd)]
to a definedstruct
orenum
. Testing has shown this to increase compilation times as it has to expand the macro. Instead, it is proposed to derive theimpl
internally in code. This has the benefit of being compiled once insidepapyrus
but comes at the cost of maintainability.quote
andsyn
can be used procedurally to generate code.papyrus
.Considerations:
kserd_derive
, expose the relevant functions.