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

All traits are loaded into end-user project #169

Open
Artemka374 opened this issue Sep 18, 2023 · 0 comments
Open

All traits are loaded into end-user project #169

Artemka374 opened this issue Sep 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Artemka374
Copy link
Contributor

The OpenBrush library uses Rust features to allow users to selectively integrate contracts
and modules into their codebases, thereby only importing the contracts they need. However,
the system operates differently for traits. Traits are not governed by features and are loaded
automatically. This means that regardless of the features chosen by the end user, all traits get
loaded. This leads to unnecessary overhead at compilation time, especially for trait-related
macros ( trait_definition and wrapper ). Moreover, metadata files are produced for all
traits, even for contracts that are not utilized in the user's project.
Reorganize the traits folder so that the traits within also use Rust features .
This ensures that only relevant traits, those corresponding to the contracts users have
integrated from the library, are loaded into user codebases.

@Artemka374 Artemka374 added the enhancement New feature or request label Sep 18, 2023
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

1 participant