Feature idea: short hand commands for common composition scenarios
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the proposed wac script and the wac plug --plug ... --into ... command syntax. Resolve whether plug imports are inherited or controlled by a flag, then confirm that the shorthand's behavior and interface are agreed and documented.
Written by the indexing model from the issue text.
Description
The wac language is a powerful tool that enables essentially any composition scenario. However, there are some common composition scenarios for which we could provide short hand commands to accomplish without the need for a full script.
Initial Proposal
My initial proposal for the first short hand command would be for a "plug" composition scenario where there are two components, one of which exports a function that mirrors an import of the second component. The first component essentially "plugs" the import hole in the second.
Another way to think about this is as a shorthand for the following wac script:
package example:composition;
let plug = new $PLUG {};
let socket = new $SOCKET {
$SOCKET_IMPORT: plug.$PLUG_EXPORT,
};
export socket...;
The command would look like the following:
wac plug --plug $PLUG#$PLUG_EXPORT --into $SOCKET#$SOCKET_IMPORT
Unanswered questions
The above example assume that the plug has no imports. We could either provide a flag that allows for the resulting component to inherit the imports of the plug or do this be default. I'm not sure how I feel about it either way.
- 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 84/100
-
area: cli bug priority: P2 ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day