Extract dag into a separate waymark-dag crate [1 / 4]#180
Merged
piercefreeman merged 2 commits intopiercefreeman:mainfrom Feb 24, 2026
Merged
Extract dag into a separate waymark-dag crate [1 / 4]#180piercefreeman merged 2 commits intopiercefreeman:mainfrom
piercefreeman merged 2 commits intopiercefreeman:mainfrom
Conversation
Owner
|
@MOZGIII Might have to rebase for this one, otherwise looks good to me. |
Collaborator
Author
|
Rebased, ready to go |
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.
This PR utilizes the work started at #179 and extracts the dag into a separate crate.
To review changes in this PR only go here: https://github.com/piercefreeman/waymark/pull/180/changes
Now we can clearly see that dag has no dependencies on i/o (besides, maybe, std i/o) or tokio - thus it is easy to conclude it consists only of dag types and related conversions.
In the further work we could further split these two modules into
dag-core(as in holds only the core types) anddag-coverter(some logic on top of core types); this kind of organization is easy to reason about.Another potential future improvement is to split the ast (aka ir)
waymark-protointo anwaymark-proto-astpackage.This work also unlocks extracting backends base into a separate crate, since they depend on dag. It does not need the converter - only the dag types themselves - so this is where we'll see the benefit from
dag-core/dag-convertersplit in the future