Skip to content

feat(client,cli): add multi-packaging support for wkg publish - #215

Merged
vados-cosmonic merged 67 commits into
bytecodealliance:mainfrom
mkatychev:feat/multipackage-publishing
Jun 30, 2026
Merged

vados-cosmonic merged 67 commits into
bytecodealliance:mainfrom
mkatychev:feat/multipackage-publishing

Conversation

@mkatychev

@mkatychev mkatychev commented Jun 10, 2026 •

Copy link
Copy Markdown
Member

Added the ability to publish multiple WIT packages at once.
Introduced the PublishPlan struct to resolve local references into a sequence of batches for publication:

/// State for tracking dependencies during upload.
pub struct PublishPlan {
/// Graph of publishable packages where the edges are `(dependency -DependencyOf->) dependent)`
dependents: DependencyGraph<PackageSpec>,
// TODO look at using cargo's `InternedString` type for `PackageRef`:
// https://docs.rs/cargo/latest/cargo/util/interning/struct.InternedString.html
indices: LocalPackageIndex,
}

Reference implementation (cargo multi-package publishing):

Comment thread crates/wasm-pkg-client/src/lib.rs Resolved
@mkatychev

This comment was marked as resolved.

Comment thread crates/wkg/src/main.rs Resolved
@mkatychev
mkatychev requested a review from vados-cosmonic June 25, 2026 21:33
Comment thread crates/wkg/src/main.rs Resolved
Comment thread crates/wasm-pkg-core/src/wit.rs Resolved
Comment thread crates/wasm-pkg-core/src/resolver.rs Resolved
@mkatychev

This comment was marked as outdated.

@mkatychev

Copy link
Copy Markdown
Member Author

@vados-cosmonic for PublishPlan, the need for pub is because it is instantiated inside of wkg proper, this is also true for all the methods within and inner types (except for PublishPlan::len but that one makes sense to be exposed):

let mut plan = PublishPlan::from_paths(paths)?;

@mkatychev
mkatychev requested a review from vados-cosmonic June 27, 2026 03:18
@vados-cosmonic
vados-cosmonic merged commit b3e7d01 into bytecodealliance:main Jun 30, 2026
3 checks 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.

2 participants