Skip to content

Update dependencies and fix API changes#89

Merged
sytherax merged 1 commit into
mainfrom
update-deps
Oct 19, 2025
Merged

Update dependencies and fix API changes#89
sytherax merged 1 commit into
mainfrom
update-deps

Conversation

@sytherax

Copy link
Copy Markdown
Collaborator
  • Update encase to 0.12.0
  • Update naga to 26.0.0 (compatible with naga_oil)
  • Update naga_oil to 0.19.1
  • Update toml to 0.9.8
  • Update wgpu to 26.0.1
  • Update wgpu-types to 26.0.0
  • Fix wgpu API changes: poll() and RenderPassColorAttachment
  • Fix clippy warnings: use is_multiple_of() instead of % == 0
  • Run cargo fmt on all files

Amp-Thread-ID: https://ampcode.com/threads/T-53d0efdc-a9c2-49ad-939b-14683365a903

- Update encase to 0.12.0
- Update naga to 26.0.0 (compatible with naga_oil)
- Update naga_oil to 0.19.1
- Update toml to 0.9.8
- Update wgpu to 26.0.1
- Update wgpu-types to 26.0.0
- Fix wgpu API changes: poll() and RenderPassColorAttachment
- Fix clippy warnings: use is_multiple_of() instead of % == 0
- Run cargo fmt on all files

Amp-Thread-ID: https://ampcode.com/threads/T-53d0efdc-a9c2-49ad-939b-14683365a903
Co-authored-by: Amp <amp@ampcode.com>
@gooroo-dev

gooroo-dev Bot commented Oct 19, 2025

Copy link
Copy Markdown

Please double check the following review of the pull request:

🐞Mistake 🤪Typo 🚨Security 🚀Performance 💪Best Practices 📖Readability ❓Others
0 0 0 0 0 1 0

Changes in the diff

  • 🛠️ Updated multiple dependencies to newer versions in Cargo.toml files.
  • 🛠️ Removed "glam" feature from encase dependency in example Cargo.toml.
  • ✅ Fixed API change: replaced deprecated wgpu::MaintainBase::Wait with wgpu::PollType::Wait and added .unwrap() to handle the Result.
  • ✅ Replaced modulo operations with .is_multiple_of() calls for clarity and idiomatic Rust.
  • ✅ Added explicit depth_slice: None field to wgpu::RenderPassColorAttachment to comply with updated wgpu API.
  • 🛠️ Updated autogenerated shader_bindings.rs comments to reflect new wgsl_bindgen version and source hash.
  • 📖 Improved readability by using .is_multiple_of() instead of % operator.

Identified Issues

ID Type Details Severity Confidence
1 💪Best Practices Using .unwrap() on device.poll(wgpu::PollType::Wait) without error handling in example/src/demos/particle_compute_demo.rs line 373 🟡 Low 🟡 Low

Issue 1

Explanation

In example/src/demos/particle_compute_demo.rs at line 373, the code calls:

let _ = device.poll(wgpu::PollType::Wait).unwrap();

This unwraps the Result returned by device.poll(). If the poll fails, this will panic and crash the program. It is generally better to handle errors gracefully or at least log them.

Suggested fix

Handle the error explicitly instead of unwrapping:

if let Err(e) = device.poll(wgpu::PollType::Wait) {
    eprintln!("Warning: device.poll() failed: {:?}", e);
}

Explanation of the fix

This avoids panicking on poll errors and logs the error instead, improving robustness.

Missing tests

No new features or logic changes were introduced that require new tests. The changes are mostly dependency updates and API adjustments. Existing tests should suffice.

Summon me to re-review when updated! Yours, Gooroo.dev
Please add a reaction or reply to share your thoughts.

@sytherax
sytherax merged commit 4b6bcee into main Oct 19, 2025
7 checks passed
@sytherax
sytherax deleted the update-deps branch March 30, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant