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

feat: add lib.rs with gated child crates #181

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

ereslibre
Copy link
Contributor

This allows for Wasm Workers Consumers to depend on the toplevel WWS crate as a library, gating different features behind cargo features.

The cargo features that will permeate in the toplevel lib.rs depend on the usage that third parties will make of our API and I think is worth adding as needed.

This change keeps the ability for third parties to consume explicit subcrates if they want. However, if they consume more than one subcrate, when they bump the WWS version, they will need to do so in different places in their Cargo.toml. This toplevel lib.rs helps in this regard, by allowing a consumer to depend on the toplevel lib.rs, and only activate the features they need through Cargo features.

This allows for Wasm Workers Consumers to depend on the toplevel WWS
crate as a library, gating different features behind cargo features.
@ereslibre
Copy link
Contributor Author

Although I have not yet opened the PR for the containerd-wasm-shims project, the change as a consumer looks like this: deislabs/containerd-wasm-shims@main...ereslibre:wws-toplevel-lib-rs

If this gets merged, that PR can be opened with minor modifications (e.g. the branch to pull wws from)

Copy link
Contributor

@Angelmmiguel Angelmmiguel left a comment

Choose a reason for hiding this comment

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

LGTM! We can export more subcrates as required 👍

@ereslibre ereslibre merged commit 0f40272 into vmware-labs:main Jul 31, 2023
@ereslibre ereslibre deleted the common-lib-rs branch July 31, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants