Skip to content

Derive ToKserd internally #26

@kurtlawrence

Description

@kurtlawrence

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions