Go to file
2019-06-08 19:22:06 +02:00
external Build molten via script 2019-06-07 17:07:12 +02:00
MoltenVK@66b512c004 Add MoltenVK as a submodule 2019-06-07 15:28:47 +02:00
src Fix clippy warnings 2019-06-07 14:56:59 +02:00
.gitignore Init 2019-06-05 10:22:29 +02:00
.gitmodules Add MoltenVK as a submodule 2019-06-07 15:28:47 +02:00
build.rs remove unneeded link flags 2019-06-07 09:22:58 +02:00
build_molten.sh Build molten via script 2019-06-07 17:07:12 +02:00
Cargo.toml Add more information to Cargo.toml 2019-06-05 10:42:03 +02:00
LICENSE-APACHE Add license 2019-06-05 10:25:30 +02:00
LICENSE-MIT Add license 2019-06-05 10:25:30 +02:00
README.md Update README.md 2019-06-08 19:22:06 +02:00

ash-molten

ash-molten is built on top of ash and exposes a new entry point to statically link with MoltenVK.

Why?

  • You want to compile down to a single binary that doesn't need any enviroment variables to bet set.

  • You just want to try out MoltenVK without needing to setup the SDK.

Why not?

  • ash already supports MoltenVK via runtime linking. Runtime linking is the prefered way of using Vulkan because the loader can be updated at anytime without needing to recompile.

  • ash-molten doesn't have access to the validation layers and thefore can not output any debug information.

How?

let entry = ash_molten::MoltenEntry::load().expect("Unable to load Molten");
let app_name = CString::new("Hello Static Molten").unwrap();

let appinfo = vk::ApplicationInfo::builder()
    .application_name(&app_name)
    .application_version(0)
    .engine_name(&app_name)
    .engine_version(0)
    .api_version(vk_make_version!(1, 0, 0));

let create_info = vk::InstanceCreateInfo::builder().application_info(&appinfo);
let instance = entry.create_instance(&create_info, None).expect("Instance");
let devices = instance.enumerate_physical_devices();
println!("{:?}", devices);

How does it work?

ash-molten links statically with MoltenVK, it then uses vkGetInstanceProcAddr to resolve all the function pointers at runtime.

ash-molten ships with a prebuilt library which you can find in external.

MoltenVK is built via build_molten.sh. MoltenVK is added as a git submodule. See the commit hash to find out which version ash-molten uses.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.