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

Update MSRV to 1.56 #1838

Merged
merged 2 commits into from
Apr 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,13 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "1.43.0"
toolchain: "1.56.0"
override: true
- uses: actions-rs/cargo@v1
name: Downgrade bitflags to MSRV
with:
command: update
args: -p bitflags --precise 1.2.1
- uses: actions-rs/cargo@v1
name: Downgrade indexmap to MSRV
with:
command: update
args: -p indexmap --precise 1.6.2
- uses: actions-rs/cargo@v1
name: Test all features
with:
# we could use `test` but `criterion` is a dev dependency,
# and it doesn't build with our MSRV
command: check
# `cli` already enables most features,
# except for `arbitrary`, which requires Rust-1.51
args: --workspace
command: test
args: --all-features --workspace
- name: Check snapshots
run: git diff --exit-code -- tests/out
test:
Expand Down
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ keywords = ["shader", "SPIR-V", "GLSL", "MSL"]
license = "MIT OR Apache-2.0"
exclude = ["bin/**/*", "tests/**/*", "Cargo.lock", "target/**/*"]
resolver = "2"
rust-version = "1.56"

[package.metadata.docs.rs]
all-features = true
Expand Down Expand Up @@ -41,11 +42,6 @@ validate = []
name = "criterion"
harness = false

# MSRV warnings:
# - arbitrary 1.0.3 requires Rust-1.51
# - bitflags 1.3 requires Rust-1.46
# - indexmap 1.7 requires Rust-1.49
teoxoy marked this conversation as resolved.
Show resolved Hide resolved

[dependencies]
arbitrary = { version = "1", features = ["derive"], optional = true }
bitflags = "1"
Expand Down
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Crates.io](https://img.shields.io/crates/v/naga.svg?label=naga)](https://crates.io/crates/naga)
[![Docs.rs](https://docs.rs/naga/badge.svg)](https://docs.rs/naga)
[![Build Status](https://github.com/gfx-rs/naga/workflows/pipeline/badge.svg)](https://github.com/gfx-rs/naga/actions)
![MSRV](https://img.shields.io/badge/rustc-1.43+-blue.svg)
![MSRV](https://img.shields.io/badge/rustc-1.56+-blue.svg)
[![codecov.io](https://codecov.io/gh/gfx-rs/naga/branch/master/graph/badge.svg?token=9VOKYO8BM2)](https://codecov.io/gh/gfx-rs/naga)

The shader translation library for the needs of [wgpu](https://github.com/gfx-rs/wgpu) and [gfx-rs](https://github.com/gfx-rs/gfx) projects.
Expand Down Expand Up @@ -66,15 +66,3 @@ make validate-dot # for dot files, requires GraphViz installed
make validate-wgsl # for WGSL shaders
make validate-hlsl # for HLSL shaders. Note: this Make target makes use of the "sh" shell. This is not the default shell in Windows.
```

## MSRV

The `naga` codebase's MSRV is 1.43. However some newer versions of our dependencies have newer MSRVs than that. Here are a list of all known MSRV breaking dependencies and the versions that hold to MSRV.

- `bitflags`: `>1.3` have an MSRV of 1.46. `<=1.2` has an MSRV of 1.43 or earlier.

If you want to use `naga` with `1.43` add the following to your Cargo.toml dependency list even if you don't use bitflags yourself:

```toml
bitflags = "<1.3"
```
6 changes: 3 additions & 3 deletions src/front/glsl/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,9 @@ fn glsl_float_min(x: f64, y: f64) -> f64 {

/// Helper function to implement the GLSL `clamp` function for floats.
///
/// While Rust does provide a `f64::clamp` method, it requires a version of rust
/// above our MSRV and it also panics if either `min` or `max` are `NaN`s which
/// is not the behavior specified by the glsl specification.
/// While Rust does provide a `f64::clamp` method, it panics if either
/// `min` or `max` are `NaN`s which is not the behavior specified by
/// the glsl specification.
fn glsl_float_clamp(value: f64, min: f64, max: f64) -> f64 {
glsl_float_min(glsl_float_max(value, min), max)
}
Expand Down