Skip to content

Commit

Permalink
Don't prefix with ash::vk::, instead expect a crate named vulkan::
Browse files Browse the repository at this point in the history
This crate would be the place where either:

1. `ash::vk::*` is reexported;
2. manual reexports are generated from `Vulkan-1.0.gir`;
3. something else.
  • Loading branch information
MarijnS95 committed Sep 23, 2024
1 parent 1b21bdc commit 12fab48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/codegen/sys/ffi_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ fn ffi_inner(env: &Env, tid: library::TypeId, mut inner: String) -> Result {
| Type::List(..)
| Type::SList(..)
| Type::HashTable(..) => fix_name(env, tid, &inner),
Type::Custom(ref c) => return Ok(c.name.clone().into()),
// TODO: Add namespace!
Type::Custom(ref c) => {
// return Ok(c.name.clone().into());
Ok(format!(
"{}::{}",
env.namespaces[tid.ns_id].higher_crate_name, c.name
)
.into())
}
_ => {
if let Some(glib_name) = env.library.type_(tid).get_glib_name() {
if inner != glib_name {
Expand Down
3 changes: 2 additions & 1 deletion src/library_postprocessing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ impl Library {
for ns_type in ns.types.iter_mut().flatten() {
if let Type::Record(incomplete_record) = ns_type {
*ns_type = Type::Custom(Custom {
name: format!("ash::vk::{}", incomplete_record.name),
// name: format!("ash::vk::{}", incomplete_record.name),
name: incomplete_record.name.clone(),
conversion_type: ConversionType::Direct,
});
}
Expand Down

0 comments on commit 12fab48

Please sign in to comment.