chore: add set_compiled_artifacts to ProjectCompileOutput impl#33
Merged
DaniPopes merged 2 commits intofoundry-rs:mainfrom Dec 12, 2023
dutterbutter:db/add_set_get_for_compiler_artifact_object
Merged
chore: add set_compiled_artifacts to ProjectCompileOutput impl#33DaniPopes merged 2 commits intofoundry-rs:mainfrom dutterbutter:db/add_set_get_for_compiler_artifact_object
set_compiled_artifacts to ProjectCompileOutput impl#33DaniPopes merged 2 commits intofoundry-rs:mainfrom
dutterbutter:db/add_set_get_for_compiler_artifact_object
Conversation
Evalir
approved these changes
Dec 12, 2023
Member
Evalir
left a comment
There was a problem hiding this comment.
this is only additive, so good w/ me.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
This pull request proposes a change to the
ProjectCompileOutputimpl by creating a methodset_compiled_artifacts. The modification is required for the usage of extendingfoundryto work with non-solc compilers likezksolcfor zkSync.Context:
Currently, the
compiled_artifactsfield is marked aspub(crate), making it accessible only within the same crate. This encapsulation poses a limitation when the struct is used as part of a larger build process where access tocompiled_artifactsis needed to be modified. Providing a set method to updatecompiled_artifactsit the proposed solution.Rationale:
In effort to extend
foundrysupport to zkSync ecosystem, the ability to set the modified Artifact is needed. You can see where we make use ofset_compiled_artifactshere.set_compiled_artifactsallows for more flexible post-compilation processes, including custom artifact handling, storage, and modifications tailored to specific use cases.Functionality Impact:
The proposed change will have no impact on existing functionality. It merely extends the accessibility of the
compiled_artifactsfield, enabling external crates to utilize the compiled bytecode. This change is backward-compatible and does not alter the behavior of any existing code that depends on theProjectCompileOutputstruct.Solution
Solution:
PR Checklist