replace alloy dependencies with specific sub-dependencies#4230
Merged
MartinquaXD merged 10 commits intomainfrom Mar 5, 2026
Merged
replace alloy dependencies with specific sub-dependencies#4230MartinquaXD merged 10 commits intomainfrom
alloy dependencies with specific sub-dependencies#4230MartinquaXD merged 10 commits intomainfrom
Conversation
5f21c46 to
3b13640
Compare
alloyalloy dependencies with specific sub-dependencies
Contributor
There was a problem hiding this comment.
Code Review
This pull request effectively refactors the dependency on the monolithic alloy crate into more granular sub-crate dependencies. This is a positive change for dependency management and should help with compile times. The extraction of signature-validator and zeroex_api from the shared crate into their own crates is also a good step towards better modularity. The changes are mostly mechanical and look correct. I have one minor suggestion for improvement.
I am having trouble creating individual review comments. Click here to see my feedback.
crates/liquidity-sources/src/zeroex.rs (66)
The url crate provides a join method that is more robust for joining URL paths than the custom join_url helper. Using it is more idiomatic. After this change, the join_url function can be removed.
let mut url = base_url.join("/orderbook/v1/orders").unwrap();
52067e2 to
5db94ff
Compare
5db94ff to
a2ba3f1
Compare
fafk
approved these changes
Mar 5, 2026
squadgazzz
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While depending on
alloyis convenient because it bundles everything inside 1 dependency it also hides what parts are actually needed and can delay the compilation of crates unnecessarily.Changes
replace
alloydependency with the actually used sub-crates likealloy-primitivesandalloy-providerthis PR mostly focuses on the smaller "leaf" dependency crates as they are manageable in size and allowing them to compile earlier is more important than optimizing crates like
driver, andautopilot.So far this PR only improves the compile time very slightly by making sure
contractsdoes not indirectly depend onaws-sdk-kmsas that is insanely slow to compile.The effects of this change will be more pronounced when we change the
contractscrate to be compiled as individualcrates.But I think even without huge compile time gains being explicit about our dependencies still makes sense.
How to test
compiler