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

Add wasm-pkg-common crate #25

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Add wasm-pkg-common crate #25

merged 3 commits into from
Jun 6, 2024

Conversation

lann
Copy link
Collaborator

@lann lann commented May 28, 2024

This PR includes:

  • Common registry types:
    • Registry (domain)
    • PackageRef (namespace + name)
    • Label (lowercase kebab)
  • Config, with package->registry mappings and individual registry configuration
    • Updates the syntax from warg-pkg-loader
    • Various methods to read and merge config from multiple sources
  • RegistryMetadata, representing the content of /.well-known/wasm-pkg/registry.json
    • This updates the syntax, making the basic data structure more protocol-agnostic while maintaining (short-term) backward-compat

I want to solidify a config format as at least a medium-term compatibility guarantee; we can always introduce a config file versioning scheme for revisions later if needed, but its nice to avoid too much backward-compat code.

@calvinrp
Copy link
Collaborator

calvinrp commented Jun 4, 2024

Just getting around to reviewing, but still going thru.

I think we can safely drop the backward compatible well-known logic / fields. We aren't relying on the behavior in our install instructions yet. And usage is very minimal for these tools. Can coordinate making the change.

@lann
Copy link
Collaborator Author

lann commented Jun 4, 2024

I think we can safely drop the backward compatible well-known logic / fields.

We can drop it in a future change; it just reduces the amount of coordination needed between various moving pieces.

@lann
Copy link
Collaborator Author

lann commented Jun 4, 2024

I was going to wait until I had some integration work done with this, but given that #29 depends on this now I'll just rebase what exists now for review.

@lann lann marked this pull request as ready for review June 5, 2024 20:20
Copy link
Collaborator

@thomastaylor312 thomastaylor312 left a comment

Choose a reason for hiding this comment

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

Everything looks good to me

@lann lann merged commit 6d7aa0e into bytecodealliance:main Jun 6, 2024
1 check passed
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.

3 participants