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

Reduce used crates for public libraries #11652

Open
akorchyn opened this issue Jun 23, 2024 · 1 comment
Open

Reduce used crates for public libraries #11652

akorchyn opened this issue Jun 23, 2024 · 1 comment

Comments

@akorchyn
Copy link
Contributor

akorchyn commented Jun 23, 2024

Currently, we have pretty huge primitive and core libraries that pull too many crates for their need.
This issue is created as part of the code review process for #11639 to track improvements.

Recently, I have been working to improve that situation in the following PRs: #11462, #11597, #11578, #11639
That said, this process is far from being completed. As part of the work I have found potential improvements that could be made:

  • Extract business logic from near-primitives
  • near-async uses near-o11y for logging only. This crate is potential overkill
  • near-store can feature gate metrics by that make near-o11y optional
  • feature-gate serde implementation
  • iterate over all libraries removing dependency for near-async where it is used only for near-time
  • nightly pulls all optional dependencies. The current nightly fmt script prevents using the '?' symbol in the feature list, so it's impossible to have something like that: image The default syntax enables optional dependencies that make nightly pull extra and unused deps.

Please, feel free to extend this list, and let's track it in one place.

@Longarithm
Copy link
Member

@akorchyn there is issue with building specific intermediate nearcore crates. When I build near-epoch-manager, cargo complains about missing imports, which is solved by additional features propagating (e.g. rand) as in #11732 (WIP). Could you look into impacted crates as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants