Skip to content

feat(wkg,core,client): intial wkg workspace approach#231

Merged
mkatychev merged 16 commits into
mainfrom
mkatychev/feat/wkg-workspaces
Jul 13, 2026
Merged

feat(wkg,core,client): intial wkg workspace approach#231
mkatychev merged 16 commits into
mainfrom
mkatychev/feat/wkg-workspaces

Conversation

@mkatychev

@mkatychev mkatychev commented Jul 10, 2026

Copy link
Copy Markdown
Member

PR adds initial workspace support for wkg fetch and wkg publish

wkg publish:

  • added --workspace flag to select packages for publishing from the wkg.toml manifest (if workspace table is present)
  • added --skip-dupes: to allow idempotent publishing, wkg publish will skip publishing a version that is already available upstream instead of producing an error.

wkg fetch:

  • supports multi package lockfiles by unioning the dependency trees of all included packages
  • supports workspace fetching

Introduced WorkspaceConfig to manage workspace configurations in manifests:

pub enum WorkspaceConfig {
// `[workspace]`
Root(WorkspaceRootConfig),
// - `workspace = "path/to/workspace/root"`
// - TODO(mkatychev): implement workspace package level field
// - https://doc.rust-lang.org/cargo/reference/manifest.html#the-workspace-field
// Member {
// root: Option<String>,
// },
}

WorkspaceRootConfig added as a virtual-manifest stand-in:

pub struct WorkspaceRootConfig {
#[serde(default, skip)]
pub(super) root_dir: PathBuf,
pub members: Vec<PathBuf>,
pub metadata: Option<Metadata>,
}

@mkatychev mkatychev force-pushed the mkatychev/feat/wkg-workspaces branch from 780ef2a to 16c8e3a Compare July 10, 2026 19:28
mkatychev added a commit that referenced this pull request Jul 11, 2026
Split changes from
#231 in
preparation for `WorkspaceConfig`/`WorkspaceRootConfig` additions.

* added `PackageRef` to `Error::VersionAlreadyExists`:

https://github.com/bytecodealliance/wasm-pkg-tools/blob/068a2b321d5680db9829323eac1741839b90c39a/crates/wasm-pkg-common/src/lib.rs#L58-L59
* introduce `pub const WIT_DEPS_DIR`:

https://github.com/bytecodealliance/wasm-pkg-tools/blob/068a2b321d5680db9829323eac1741839b90c39a/crates/wasm-pkg-core/src/wit.rs#L31-L32
* add `PublishVerifier` to reuse logic between current multi package
publishing eventual workspace fetching found in
#231:

https://github.com/bytecodealliance/wasm-pkg-tools/blob/790b44cbea5cd24a57f448ca86a624dcc52eb426/crates/wkg/src/overlay.rs#L21-L31
Comment thread crates/wasm-pkg-core/src/manifest/workspace.rs
@mkatychev mkatychev force-pushed the mkatychev/feat/wkg-workspaces branch from 94bfd28 to 1367cc3 Compare July 11, 2026 14:01
@mkatychev mkatychev force-pushed the mkatychev/feat/wkg-workspaces branch from cf99224 to b562b52 Compare July 11, 2026 14:13
@mkatychev mkatychev force-pushed the mkatychev/feat/wkg-workspaces branch from 8f168c9 to 574197c Compare July 11, 2026 15:01
@mkatychev mkatychev marked this pull request as ready for review July 11, 2026 15:13
@mkatychev mkatychev requested a review from vados-cosmonic July 11, 2026 15:15
Comment thread crates/wasm-pkg-core/src/manifest.rs

@vados-cosmonic vados-cosmonic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀

Mostly nits, and feel free to push any you want to followup(s)!

Comment thread crates/wasm-pkg-core/src/manifest/paths.rs
Comment thread crates/wasm-pkg-core/src/manifest/workspace.rs
Comment thread crates/wasm-pkg-core/src/manifest/workspace.rs
Comment thread crates/wasm-pkg-core/src/manifest/workspace.rs
Comment thread crates/wasm-pkg-core/src/manifest/workspace.rs
Comment thread crates/wasm-pkg-core/src/manifest.rs Outdated
Comment thread crates/wasm-pkg-core/src/manifest.rs Outdated
Comment thread crates/wasm-pkg-core/src/manifest.rs
Comment thread crates/wkg/src/wit.rs
mkatychev and others added 2 commits July 13, 2026 12:08
Co-authored-by: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com>
@mkatychev mkatychev merged commit e9aba5c into main Jul 13, 2026
6 checks passed
@mkatychev mkatychev deleted the mkatychev/feat/wkg-workspaces branch July 13, 2026 22:27
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