`wac_types::Package` not having its own `wac_types::Types` requires re-parsing packages on every composition
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with wac_types::Package::from_bytes, wac_types::Types, and wac_graph::CompositionGraph to understand how package types are registered and remapped. Compare repeated compositions using cached utility packages with reparsing, and consider the proposed register_package_with_types entry point; done means reusable packages can participate in multiple compositions without reparsing.
Written by the indexing model from the issue text.
Description
In my usecase, I need to perform several compositions that each have a different "main" component but several util components that are the same (they implement WASI, similar to what wasi-virt does but even more constrained). Previously, I was only parsing these util packages once (using Package::from_bytes, storing them in a std::sync::OnceLock, and then using them in many compositions.
I just updated my code to the latest version of wac on git. Now that the wac_types::Types are inside the wac_graph::CompositionGraph, I can no longer cache (or at least I don't know how to) the util packages but need to re-parse them on every composition.
Perhaps there could be an extra utility function, e.g. wac_graph::CompositionGraph::register_package_with_types, to take in another wac_types::Types instance and to add all of these types to the composition graph's types and to remap the package's types into the composition graph's ones (I assume something like that was done before)?
Thank you for your help and all of your amazing work on these crates!
- Dominant language
- Rust
- Stars
- 208
- Forks
- 41
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 3
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytecodealliance/wac
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
bytecodealliance/wac#181 · 7 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
bytecodealliance/wac#170 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bytecodealliance/wac#169 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bytecodealliance/wac#166 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
bytecodealliance/wac#165 ·
All issues in bytecodealliance/wac
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
arkworks-rs/algebra#1161 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
lbjlaq/Antigravity-Manager#3525 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
agent-ready area:platform bug criticality:p3 rust triage:needs-implementation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
registrystack/registry-stack#1583 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Docs: "Work with Codex from anywhere" page still claims Windows mobile support is "coming soon"Openapp documentation remote windows-os
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day