Skip to content

Ergonomic builder and wrapper improvements#38

Merged
Hiddentale merged 3 commits into
mainfrom
more_polish
Apr 2, 2026
Merged

Ergonomic builder and wrapper improvements#38
Hiddentale merged 3 commits into
mainfrom
more_polish

Conversation

@Hiddentale

Copy link
Copy Markdown
Owner

Description

Three ergonomic improvements to the generated and hand-written API:

  • map_memory returns *mut c_void directly instead of taking a *mut *mut c_void output parameter. Hand-written wrapper added to the exclusion set.
  • Builder setters accept &T for *const VkFoo fields (e.g. p_application_info, p_enabled_features, pipeline state pointers). Eliminates the &*builder deref pattern throughout all examples.
  • DeviceCreateInfo::enabled_layer_names slice setter now generated. vk.xml marks this field as deprecated with no len attribute, so the codegen infers the count field by naming convention (ppEnabledFooNamesenabledFooCount).

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I ran cargo fmt --all (code is formatted)
  • I ran cargo clippy --workspace --all-targets -- -D warnings (no warnings)
  • I ran cargo test --workspace (all tests pass)
  • I added tests for new functionality
  • I updated relevant documentation

Documentation Checklist

  • All new public items have doc comments (see CONTRIBUTING.md)
  • # Safety section on all unsafe functions
  • # Errors section on all Result-returning functions
  • Examples compile: cargo test --doc
  • No broken doc links: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps

@Hiddentale Hiddentale self-assigned this Apr 2, 2026
@Hiddentale Hiddentale merged commit 16470cb into main Apr 2, 2026
17 checks passed
@Hiddentale Hiddentale deleted the more_polish branch April 2, 2026 20:02
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