mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
Move minimum supported rust version (MSRV) from 1.65 back to 1.64. (#3231)
This commit is contained in:
parent
2ccfb42440
commit
73b23f1c8d
@ -1 +0,0 @@
|
||||
large-error-threshold = 225 # bytes
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
RUST_VERSION: 1.65
|
||||
RUST_VERSION: 1.64
|
||||
PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work
|
||||
RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
|
2
.github/workflows/cts.yml
vendored
2
.github/workflows/cts.yml
vendored
@ -9,7 +9,7 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
RUST_VERSION: 1.65
|
||||
RUST_VERSION: 1.64
|
||||
|
||||
jobs:
|
||||
cts:
|
||||
|
@ -86,6 +86,7 @@ Bottom level categories:
|
||||
- Avoid panicking in some interactions with invalid resources by @nical in (#3094)[https://github.com/gfx-rs/wgpu/pull/3094]
|
||||
- Remove `wgpu_types::Features::DEPTH24PLUS_STENCIL8`, making `wgpu::TextureFormat::Depth24PlusStencil8` available on all backends. By @Healthire in (#3151)[https://github.com/gfx-rs/wgpu/pull/3151]
|
||||
- Fix an integer overflow in `queue_write_texture` by @nical in (#3146)[https://github.com/gfx-rs/wgpu/pull/3146]
|
||||
- Make `RenderPassCompatibilityError` and `CreateShaderModuleError` not so huge. By @jimblandy in (#3226)[https://github.com/gfx-rs/wgpu/pull/3226]
|
||||
|
||||
#### WebGPU
|
||||
|
||||
@ -109,7 +110,7 @@ Bottom level categories:
|
||||
|
||||
### Testing/Internal
|
||||
|
||||
- Update the `minimum supported rust version` to 1.65
|
||||
- Update the `minimum supported rust version` to 1.64
|
||||
- Use cargo 1.64 workspace inheritance feature. By @jinleili in [#3107](https://github.com/gfx-rs/wgpu/pull/3107)
|
||||
|
||||
#### Vulkan
|
||||
|
@ -17,7 +17,7 @@ default-members = ["wgpu", "wgpu-hal", "wgpu-info"]
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
rust-version = "1.65"
|
||||
rust-version = "1.64"
|
||||
keywords = ["graphics"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
homepage = "https://wgpu.rs/"
|
||||
|
19
README.md
19
README.md
@ -31,10 +31,27 @@ For an overview of all the components in the gfx-rs ecosystem, see [the big pict
|
||||
|
||||
### MSRV policy
|
||||
|
||||
Minimum Supported Rust Version is **1.65**.
|
||||
Minimum Supported Rust Version is **1.64**.
|
||||
It is enforced on CI (in "/.github/workflows/ci.yml") with `RUST_VERSION` variable.
|
||||
This version can only be upgraded in breaking releases.
|
||||
|
||||
The `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates should never
|
||||
require an MSRV ahead of Firefox's MSRV for nightly builds, as
|
||||
determined by the value of `MINIMUM_RUST_VERSION` in
|
||||
[`python/mozboot/mozboot/util.py`][util]. However, Firefox uses `cargo
|
||||
vendor` to extract only those crates it actually uses, so the
|
||||
workspace's other crates can have more recent MSRVs.
|
||||
|
||||
*Note for Rust 1.64*: The workspace itself can even use a newer MSRV
|
||||
than Firefox, as long as the vendoring step's `Cargo.toml` rewriting
|
||||
removes any features Firefox's MSRV couldn't handle. For example,
|
||||
`wgpu` can use manifest key inheritance, added in Rust 1.64, even
|
||||
before Firefox reaches that MSRV, because `cargo vendor` copies
|
||||
inherited values directly into the individual crates' `Cargo.toml`
|
||||
files, producing 1.63-compatible files.
|
||||
|
||||
[util]: https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/util.py
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Rust
|
||||
|
@ -80,10 +80,7 @@ pub(crate) struct RenderPassContext {
|
||||
#[derive(Clone, Debug, Error)]
|
||||
pub enum RenderPassCompatibilityError {
|
||||
#[error("Incompatible color attachment: the renderpass expected {0:?} but was given {1:?}")]
|
||||
IncompatibleColorAttachment(
|
||||
ArrayVec<Option<TextureFormat>, { hal::MAX_COLOR_ATTACHMENTS }>,
|
||||
ArrayVec<Option<TextureFormat>, { hal::MAX_COLOR_ATTACHMENTS }>,
|
||||
),
|
||||
IncompatibleColorAttachment(Vec<Option<TextureFormat>>, Vec<Option<TextureFormat>>),
|
||||
#[error(
|
||||
"Incompatible depth-stencil attachment: the renderpass expected {0:?} but was given {1:?}"
|
||||
)]
|
||||
@ -102,8 +99,8 @@ impl RenderPassContext {
|
||||
) -> Result<(), RenderPassCompatibilityError> {
|
||||
if self.attachments.colors != other.attachments.colors {
|
||||
return Err(RenderPassCompatibilityError::IncompatibleColorAttachment(
|
||||
self.attachments.colors.clone(),
|
||||
other.attachments.colors.clone(),
|
||||
self.attachments.colors.iter().cloned().collect(),
|
||||
other.attachments.colors.iter().cloned().collect(),
|
||||
));
|
||||
}
|
||||
if self.attachments.depth_stencil != other.attachments.depth_stencil {
|
||||
@ -1245,7 +1242,7 @@ impl<A: HalApi> Device<A> {
|
||||
pipeline::CreateShaderModuleError::Parsing(pipeline::ShaderError {
|
||||
source: code.to_string(),
|
||||
label: desc.label.as_ref().map(|l| l.to_string()),
|
||||
inner,
|
||||
inner: Box::new(inner),
|
||||
})
|
||||
})?;
|
||||
(Cow::Owned(module), code.into_owned())
|
||||
@ -1308,7 +1305,7 @@ impl<A: HalApi> Device<A> {
|
||||
pipeline::CreateShaderModuleError::Validation(pipeline::ShaderError {
|
||||
source,
|
||||
label: desc.label.as_ref().map(|l| l.to_string()),
|
||||
inner,
|
||||
inner: Box::new(inner),
|
||||
})
|
||||
})?;
|
||||
let interface =
|
||||
|
@ -66,7 +66,7 @@ impl<A: hal::Api> Resource for ShaderModule<A> {
|
||||
pub struct ShaderError<E> {
|
||||
pub source: String,
|
||||
pub label: Option<String>,
|
||||
pub inner: E,
|
||||
pub inner: Box<E>,
|
||||
}
|
||||
#[cfg(feature = "wgsl")]
|
||||
impl fmt::Display for ShaderError<naga::front::wgsl::ParseError> {
|
||||
|
@ -8,7 +8,12 @@ homepage.workspace = true
|
||||
repository.workspace = true
|
||||
keywords.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to
|
||||
# copy the crates it actually uses out of the workspace, so it's meaningful for
|
||||
# them to have less restrictive MSRVs individually than the workspace as a
|
||||
# whole, if their code permits. See `../README.md` for details.
|
||||
rust-version = "1.60"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
# Ideally we would enable all the features.
|
||||
|
Loading…
Reference in New Issue
Block a user