Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
toolchain: [stable]
include:
- os: ubuntu-latest
toolchain: "1.92.0"
toolchain: "1.96.0"
variant: MSRV
- os: ubuntu-latest
toolchain: beta
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Bump MSRV to 1.96.0 (#705)

## [0.17.1] — 2026-01-30 – 2026-02-03

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Diggory Hardy <git@dhardy.name>"]
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/kas-gui/kas"
rust-version = "1.92.0"
rust-version = "1.96.0"

[package]
name = "kas"
Expand Down
2 changes: 1 addition & 1 deletion crates/kas-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ab_glyph = { version = "0.2.10", optional = true }
swash = { version = "0.2.4", features = ["scale"] }
linearize = { version = "0.1.5", features = ["derive"] }
kas-text = "0.9.0"
easy-cast = "0.5.4" # used in doc links
easy-cast = "0.6.0"
pulldown-cmark = { version = "0.13.0", optional = true }

[dependencies.kas-macros]
Expand Down
4 changes: 2 additions & 2 deletions crates/kas-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ quote = "1.0"
proc-macro2 = { version = "1.0" }
proc-macro-error3 = { version = "3.0", default-features = false }
bitflags = "2.3.3"
impl-tools-lib = "0.12.0"
impl-tools-lib = "0.13.0"

[dependencies.syn]
version = "2.0.22"
version = "3.0.2"
# We need 'extra-traits' for equality testing
# We need 'full' for parsing macros within macro arguments
features = ["extra-traits", "full", "visit", "visit-mut"]
Expand Down
3 changes: 2 additions & 1 deletion crates/kas-macros/src/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn widget(attr_span: Span, scope: &mut Scope) -> Result<()> {
let mut translation_span = None;
let mut handle_scroll = false;
for (index, impl_) in scope.impls.iter_mut().enumerate() {
if let Some((_, ref path, _)) = impl_.trait_ {
if let Some((ref path, _)) = impl_.trait_ {
if *path == parse_quote! { ::kas::Widget }
|| *path == parse_quote! { kas::Widget }
|| *path == parse_quote! { Widget }
Expand Down Expand Up @@ -287,6 +287,7 @@ pub fn widget(attr_span: Span, scope: &mut Scope) -> Result<()> {
});
}
field.ty = Type::Path(syn::TypePath {
attrs: vec![],
qself: None,
path: core_type.into(),
});
Expand Down
2 changes: 1 addition & 1 deletion crates/kas-macros/src/widget_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn derive_widget(attr_span: Span, _: DeriveArgs, scope: &mut Scope) -> Result<()
let mut widget_impl = None;

for (index, impl_) in scope.impls.iter().enumerate() {
if let Some((_, ref path, _)) = impl_.trait_ {
if let Some((ref path, _)) = impl_.trait_ {
if *path == parse_quote! { ::kas::Layout }
|| *path == parse_quote! { kas::Layout }
|| *path == parse_quote! { Layout }
Expand Down
2 changes: 1 addition & 1 deletion crates/kas-wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package = "kas-core"
path = "../kas-core"

[dependencies.wgpu]
version = "29.0.0"
version = "30.0.0"
default-features = false
features = ["spirv"]

Expand Down
5 changes: 4 additions & 1 deletion crates/kas-wgpu/src/draw/atlases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ impl<I: bytemuck::Pod> Window<I> {
mapped_at_creation: true,
});

let mut view = buffer.slice(..byte_len.get()).get_mapped_range_mut();
let mut view = buffer
.slice(..byte_len.get())
.get_mapped_range_mut()
.unwrap();
copy_to_slice(&mut self.passes, &mut view);
drop(view);

Expand Down
5 changes: 4 additions & 1 deletion crates/kas-wgpu/src/draw/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ impl<V: bytemuck::Pod> Window<V> {
mapped_at_creation: true,
});

let mut view = buffer.slice(..byte_len.get()).get_mapped_range_mut();
let mut view = buffer
.slice(..byte_len.get())
.get_mapped_range_mut()
.unwrap();
copy_to_slice(&mut self.passes, &mut view);
drop(view);

Expand Down
4 changes: 2 additions & 2 deletions crates/kas-wgpu/src/draw/flat_round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Pipeline {
module: &shaders.vert_flat_round,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<Vertex>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![
Expand All @@ -79,7 +79,7 @@ impl Pipeline {
3 => Float32x2,
4 => Float32x2
],
}],
})],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
Expand Down
12 changes: 6 additions & 6 deletions crates/kas-wgpu/src/draw/images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Images {
module: &shaders.vert_image,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<InstanceRgba>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Instance,
attributes: &wgpu::vertex_attr_array![
Expand All @@ -122,7 +122,7 @@ impl Images {
2 => Float32x2,
3 => Float32x2,
],
}],
})],
},
wgpu::FragmentState {
module: &shaders.frag_image,
Expand All @@ -146,7 +146,7 @@ impl Images {
module: &shaders.vert_glyph,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<InstanceMask>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Instance,
attributes: &wgpu::vertex_attr_array![
Expand All @@ -156,7 +156,7 @@ impl Images {
3 => Float32x2,
4 => Float32x4,
],
}],
})],
},
wgpu::FragmentState {
module: &shaders.frag_glyph,
Expand Down Expand Up @@ -185,7 +185,7 @@ impl Images {
module: &shaders.vert_glyph,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<InstanceMask>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Instance,
attributes: &wgpu::vertex_attr_array![
Expand All @@ -195,7 +195,7 @@ impl Images {
3 => Float32x2,
4 => Float32x4,
],
}],
})],
},
wgpu::FragmentState {
module: &shaders.frag_subpixel,
Expand Down
2 changes: 1 addition & 1 deletion crates/kas-wgpu/src/draw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Default for ClipRegion {
pub struct DrawPipe<C> {
pub(crate) adapter: wgpu::Adapter,
pub(crate) device: wgpu::Device,
queue: wgpu::Queue,
pub(crate) queue: wgpu::Queue,
staging_belt: wgpu::util::StagingBelt,
bgl_common: wgpu::BindGroupLayout,
light_norm_buf: wgpu::Buffer,
Expand Down
4 changes: 2 additions & 2 deletions crates/kas-wgpu/src/draw/round_2col.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Pipeline {
module: &shaders.vert_round_2col,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<Vertex>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![
Expand All @@ -67,7 +67,7 @@ impl Pipeline {
2 => Float32x4,
3 => Float32x2,
],
}],
})],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
Expand Down
4 changes: 2 additions & 2 deletions crates/kas-wgpu/src/draw/shaded_round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Pipeline {
module: &shaders.vert_shaded_round,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<Vertex>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![
Expand All @@ -74,7 +74,7 @@ impl Pipeline {
3 => Float32x2,
4 => Float32x2
],
}],
})],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
Expand Down
4 changes: 2 additions & 2 deletions crates/kas-wgpu/src/draw/shaded_square.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ impl Pipeline {
module: &shaders.vert_shaded_square,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<Vertex>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![
0 => Float32x2,
1 => Float32x4,
2 => Float32x2,
],
}],
})],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
Expand Down
1 change: 1 addition & 0 deletions crates/kas-wgpu/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ impl Options {
power_preference: self.power_preference,
force_fallback_adapter: self.backends.is_empty(),
compatible_surface: None,
apply_limit_buckets: false,
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/kas-wgpu/src/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl<C: CustomPipe> WindowSurface for Surface<C> {
let sc_desc = wgpu::SurfaceConfiguration {
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
format: crate::draw::RENDER_TEX_FORMAT,
color_space: wgpu::SurfaceColorSpace::Srgb,
width: size.0.cast(),
height: size.1.cast(),
present_mode,
Expand Down Expand Up @@ -135,7 +136,7 @@ impl<C: CustomPipe> WindowSurface for Surface<C> {
shared.render(&mut self.draw, &view, clear_color);

let pre_present = Instant::now();
frame.present();
shared.queue.present(frame);

if !outdated {
PresentResult::Success(pre_present)
Expand Down
4 changes: 2 additions & 2 deletions examples/mandlebrot/mandlebrot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ impl CustomPipeBuilder for PipeBuilder {
module: &shaders.vertex,
entry_point: Some("main"),
compilation_options: Default::default(),
buffers: &[wgpu::VertexBufferLayout {
buffers: &[Some(wgpu::VertexBufferLayout {
array_stride: size_of::<Vertex>() as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![0 => Float32x3, 1 => Float32x2],
}],
})],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
Expand Down