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

wac plug with registry support #106

Merged
merged 11 commits into from
May 13, 2024
Merged

Conversation

calvinrp
Copy link
Collaborator

@calvinrp calvinrp commented May 10, 2024

Updates Warg to 0.6.0 release with support for federating across multiple registries.

Adds wac plug registry support (feature flag still but a default one).

Existing behavior is unchanged:
wac plug my-component.wasm --plug helpful.wasm -o plugged.wasm

But now, you can mix in registry package names or local file paths. In any combination. Kind of fun.

It determines whether to look in the registry or local path by trying to parse as valid namespace:package-name. Also, parses with versions in namespace:[email protected] syntax. If it is a valid package name, then it looks in the registry otherwise tries local file paths. So path/some-file.wasm would be unambiguously a local file path.

wac plug macovedj:hashimap-service --plug macovedj:[email protected] -o plugged.wasm
(those are packages from @macovedj WasmIO demo and that command will work if Warg is configured)

or

wac plug hashimap-service.wasm --plug macovedj:[email protected] -o plugged.wasm

@calvinrp calvinrp changed the title Warg plug with registry support Wac plug with registry support May 10, 2024
@calvinrp calvinrp changed the title Wac plug with registry support wac plug with registry support May 10, 2024
@calvinrp
Copy link
Collaborator Author

calvinrp commented May 10, 2024

@macovedj thanks for the review, but I definitely want the other maintainers to weigh in on this.

Copy link
Collaborator

@fibonacci1729 fibonacci1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me; I'd like to give @rylev a chance to review when he returns next week.

Copy link
Collaborator

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I just would like to see the comment about the usage of println! in the plug command addressed.

crates/wac-resolver/src/registry.rs Outdated Show resolved Hide resolved
src/commands/plug.rs Outdated Show resolved Hide resolved
…d using the progress bar output when only one thing to do
@calvinrp calvinrp merged commit f5dcba1 into bytecodealliance:main May 13, 2024
7 checks passed
@calvinrp calvinrp deleted the warg-plug branch May 13, 2024 12:12
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 this pull request may close these issues.

4 participants