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

Allow patch functionality to operate on svd io::Read instances #265

Open
tones111 opened this issue Jan 9, 2025 · 0 comments · May be fixed by #266
Open

Allow patch functionality to operate on svd io::Read instances #265

tones111 opened this issue Jan 9, 2025 · 0 comments · May be fixed by #266

Comments

@tones111
Copy link

tones111 commented Jan 9, 2025

I'm trying to use svdtools::patch::process_file within a build.rs and running into some friction. My crate generates the input svd file under cargo's ${OUT_DIR}, which requires modification of the _svd value in the patch file. In order to not modify the revision controlled patch files I now need to copy them to a temporary working location. For this use case coupling the svd path into the patch file introduces a lot of unnecessary complexity.

Proposal:
I'd like an ex: svdtools::patch::process_reader that instead of searching for the "_svd" value would take the svd content as a std::io::Read and return a std::io::Read of the modified svd. That would allow the caller more flexibility to handle the svd content independent of the patch content. I think the rest of the patching logic could be shared with process_file.

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

Successfully merging a pull request may close this issue.

1 participant