From 599a96e6b7cf392cf621297076f5281fa4089459 Mon Sep 17 00:00:00 2001 From: bill fumerola Date: Sun, 24 Aug 2025 15:07:45 -0700 Subject: [PATCH 1/2] chore(serde): fix serde conditional compilation --- .github/workflows/main.yml | 2 ++ crates/wac-types/src/component.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4917c018..9fc0ea77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,6 +46,8 @@ jobs: run: cargo check --no-default-features --features wit - name: Build the `registry` feature run: cargo check --no-default-features --features registry + - name: Build the `serde` feature + run: cargo check --no-default-features --features serde - name: Build all features run: cargo check --all-features diff --git a/crates/wac-types/src/component.rs b/crates/wac-types/src/component.rs index 6436e10f..f62038b7 100644 --- a/crates/wac-types/src/component.rs +++ b/crates/wac-types/src/component.rs @@ -100,7 +100,7 @@ impl fmt::Display for WorldId { pub struct ModuleTypeId(Id); #[cfg(feature = "serde")] -impl serde::Serialize for ModuleId { +impl serde::Serialize for ModuleTypeId { fn serialize(&self, serializer: S) -> Result { self.0.index().serialize(serializer) } From 517651c539fed2288126c195a0d21769d1bcae16 Mon Sep 17 00:00:00 2001 From: bill fumerola Date: Sun, 24 Aug 2025 15:16:04 -0700 Subject: [PATCH 2/2] chore(github): run cargo check against workspace --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fc0ea77..40103644 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,17 +39,17 @@ jobs: rustup default stable shell: bash - name: Build without default features - run: cargo check --no-default-features + run: cargo check --workspace --no-default-features - name: Build the `wat` feature - run: cargo check --no-default-features --features wat + run: cargo check --workspace --no-default-features --features wat - name: Build the `wit` feature - run: cargo check --no-default-features --features wit + run: cargo check --workspace --no-default-features --features wit - name: Build the `registry` feature - run: cargo check --no-default-features --features registry + run: cargo check --workspace --no-default-features --features registry - name: Build the `serde` feature - run: cargo check --no-default-features --features serde + run: cargo check --workspace --no-default-features --features serde - name: Build all features - run: cargo check --all-features + run: cargo check --workspace --all-features rustfmt: name: Format source code