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

[Feature] Implement sol-types traits in sol! without tuples #261

Open
Tracked by #74
DaniPopes opened this issue Sep 4, 2023 · 1 comment
Open
Tracked by #74

[Feature] Implement sol-types traits in sol! without tuples #261

DaniPopes opened this issue Sep 4, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@DaniPopes
Copy link
Member

Component

sol! macro

Describe the feature you would like

Currently we implement all traits by deferring everything to a tuple of the inner types (struct, function arguments and returns, etc.).

This is bad because it:

  • duplicates the underlying types
  • has lower runtime performance due to needing to clone the types to then just use the tuple by reference
  • complicates the API
  • limits the number of struct fields, function arguments etc allowed to the max tuple size implemented by the library
  • overall, it's just not how you implement procedural macros 😸

Additional context

No response

@DaniPopes DaniPopes added the enhancement New feature or request label Sep 4, 2023
@DaniPopes DaniPopes self-assigned this Sep 4, 2023
@prestwich
Copy link
Member

has lower runtime performance due to needing to clone the types to then just use the tuple by reference

this should have been fixed by the Encodable trait being implemented for &(&T, &U, &V) now, no?

@DaniPopes DaniPopes mentioned this issue Sep 19, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants