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 Request]: Organize runtime/src/lib.rs into smaller components. #164

Closed
1 task done
ozgunozerk opened this issue Apr 16, 2024 · 0 comments · Fixed by #202
Closed
1 task done

🎁 [Feature Request]: Organize runtime/src/lib.rs into smaller components. #164

ozgunozerk opened this issue Apr 16, 2024 · 0 comments · Fixed by #202
Assignees
Labels
enhancement New feature or request

Comments

@ozgunozerk
Copy link
Collaborator

What is the feature you would like to see?

Polkadot follows a new approach, which makes the gigantic runtime/src/lib.rs file divided into more meaningful components. This makes the code easier to inspect and reason about.

Here is a screenshot:
image

And here is the potential changes we can do by following their approach:

  • impl config for each pallet inside lib.rs -> configs/mod.rs
  • xcm_config.rs -> configs/xcm_config.rs
  • impl_runtime_apis! inside lib.rs -> apis.rs

This will make our ~1000 lines long lib.rs reduced to somewhere in between 200-400 lines.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant