near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.3k stars 601 forks source link

Reduce used crates for public libraries #11652

Open akorchyn opened 2 weeks ago

akorchyn commented 2 weeks ago

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:

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

Longarithm commented 1 day ago

@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?