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

Remove public deps from wasm-metadata's API #1130

Merged
merged 1 commit into from Jul 17, 2023

Conversation

alexcrichton
Copy link
Member

Currently whenever wasmparser or wasm-encoder have a major version bump this requires a major revision of wasm-metadata to be released due to their appearance in the API of wasm-metadata. This in turn forces a major version bump of wit-component due to wit-component's usage of wasm-metadata in its public API.

The wasmparser and wasm-encoder crates, however, are relatively "unstable" crates in that the amount of features they support for wasm are shifting quite a lot over time meaning that they have a lot of major version bumps. Coupling this rate of change to wit-component which is expected to be embedded in many WIT-related bindings generators I'm predicting won't be the best development story.

To decouple these crates this commit removes the wasmparser and wasm-encoder types from the API of wasm-metadata by making them internal implementation details. After this it's possible to have a major revision of wasmparser without updating the major revision of wasm-metadata or wit-component for example.

Currently whenever `wasmparser` or `wasm-encoder` have a major version
bump this requires a major revision of `wasm-metadata` to be released
due to their appearance in the API of `wasm-metadata`. This in turn
forces a major version bump of `wit-component` due to `wit-component`'s
usage of `wasm-metadata` in its public API.

The `wasmparser` and `wasm-encoder` crates, however, are relatively
"unstable" crates in that the amount of features they support for wasm
are shifting quite a lot over time meaning that they have a lot of major
version bumps. Coupling this rate of change to `wit-component` which is
expected to be embedded in many WIT-related bindings generators I'm
predicting won't be the best development story.

To decouple these crates this commit removes the `wasmparser` and
`wasm-encoder` types from the API of `wasm-metadata` by making them
internal implementation details. After this it's possible to have a
major revision of `wasmparser` without updating the major revision of
`wasm-metadata` or `wit-component` for example.
Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

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

Thanks - I hadn't considered this problem but luckily the fix is quite easy!

@alexcrichton alexcrichton merged commit 7cec276 into bytecodealliance:main Jul 17, 2023
15 checks passed
@alexcrichton alexcrichton deleted the less-coupling branch July 17, 2023 19:17
dhil pushed a commit to dhil/wasm-tools that referenced this pull request Jul 21, 2023
Currently whenever `wasmparser` or `wasm-encoder` have a major version
bump this requires a major revision of `wasm-metadata` to be released
due to their appearance in the API of `wasm-metadata`. This in turn
forces a major version bump of `wit-component` due to `wit-component`'s
usage of `wasm-metadata` in its public API.

The `wasmparser` and `wasm-encoder` crates, however, are relatively
"unstable" crates in that the amount of features they support for wasm
are shifting quite a lot over time meaning that they have a lot of major
version bumps. Coupling this rate of change to `wit-component` which is
expected to be embedded in many WIT-related bindings generators I'm
predicting won't be the best development story.

To decouple these crates this commit removes the `wasmparser` and
`wasm-encoder` types from the API of `wasm-metadata` by making them
internal implementation details. After this it's possible to have a
major revision of `wasmparser` without updating the major revision of
`wasm-metadata` or `wit-component` for example.
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.

None yet

2 participants