From f7e8db6dea645bdb974950177c12c2959467ca90 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 20 Dec 2025 13:43:16 +0000 Subject: [PATCH 1/2] add MSRV check to CI --- .github/workflows/rust.yml | 13 +++++++++++++ Cargo.toml | 3 +++ cargo-typify/Cargo.toml | 1 + typify-impl/Cargo.toml | 1 + typify-macro/Cargo.toml | 1 + typify-test/Cargo.toml | 2 +- typify/Cargo.toml | 1 + 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f5c69049..c96d188e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,3 +32,16 @@ jobs: run: cargo build --locked --tests --verbose - name: Run tests run: cargo test --locked --verbose + + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: taiki-e/install-action@cargo-hack + - name: Check published packages on their declared MSRV + run: >- + cargo hack --workspace + --exclude typify-test + --exclude example-build + --exclude example-macro + --no-dev-deps --rust-version check diff --git a/Cargo.toml b/Cargo.toml index ecb19fed..95ecbe5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,9 @@ members = [ resolver = "2" +[workspace.package] +rust-version = "1.88.0" + [workspace.dependencies] typify = { version = "0.7.0", path = "typify" } typify-impl = { version = "0.7.0", path = "typify-impl" } diff --git a/cargo-typify/Cargo.toml b/cargo-typify/Cargo.toml index 4a48669f..040df979 100644 --- a/cargo-typify/Cargo.toml +++ b/cargo-typify/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/oxidecomputer/typify" readme = "README.md" keywords = ["json", "schema", "cargo"] categories = ["api-bindings", "compilers"] +rust-version.workspace = true default-run = "cargo-typify" diff --git a/typify-impl/Cargo.toml b/typify-impl/Cargo.toml index 4ba10fd5..da51bbdb 100644 --- a/typify-impl/Cargo.toml +++ b/typify-impl/Cargo.toml @@ -6,6 +6,7 @@ license = "Apache-2.0" description = "typify backend implementation" repository = "https://github.com/oxidecomputer/typify" readme = "../README.md" +rust-version.workspace = true [dependencies] heck = { workspace = true } diff --git a/typify-macro/Cargo.toml b/typify-macro/Cargo.toml index 3c761e45..f167d8c3 100644 --- a/typify-macro/Cargo.toml +++ b/typify-macro/Cargo.toml @@ -6,6 +6,7 @@ license = "Apache-2.0" description = "typify macro implementation" repository = "https://github.com/oxidecomputer/typify" readme = "../README.md" +rust-version.workspace = true [lib] proc-macro = true diff --git a/typify-test/Cargo.toml b/typify-test/Cargo.toml index 6b23b78a..40e59961 100644 --- a/typify-test/Cargo.toml +++ b/typify-test/Cargo.toml @@ -14,6 +14,6 @@ typify = { path = "../typify" } ipnetwork = { workspace = true } prettyplease = { workspace = true } schemars = { workspace = true } -serde = { workspace = true } +serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } syn = { workspace = true } diff --git a/typify/Cargo.toml b/typify/Cargo.toml index c7b1a8e4..3924d916 100644 --- a/typify/Cargo.toml +++ b/typify/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/oxidecomputer/typify" readme = "../README.md" keywords = ["json", "schema", "proc_macro"] categories = ["api-bindings", "compilers"] +rust-version.workspace = true [features] default = ["macro"] From f04c84f27a92d2095cb57c4c4b486cf7d1d81462 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Tue, 28 Jul 2026 10:10:06 +0100 Subject: [PATCH 2/2] select CI toolchains explicitly --- .github/workflows/rust.yml | 8 ++++++++ rust-toolchain.toml | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 rust-toolchain.toml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c96d188e..80cdd046 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@stable - name: Report cargo version run: cargo --version - name: Report rustfmt version @@ -26,8 +27,15 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-latest, macos-latest ] + rust: [ stable ] + include: + - os: ubuntu-latest + rust: nightly steps: - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} - name: Build run: cargo build --locked --tests --verbose - name: Run tests diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 65c0d610..00000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "1.89.0" -profile = "default"