🌋 ash-molten

Build Status Latest version Docs Contributor Covenant Embark

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

Why?

Why not?

How?

```Rust let entry = ashmolten::MoltenEntry::load().expect("Unable to load Molten"); let appname = CString::new("Hello Static Molten").unwrap();

let appinfo = vk::ApplicationInfo::builder() .applicationname(&appname) .applicationversion(0) .enginename(&appname) .engineversion(0) .apiversion(vkmake_version!(1, 0, 0));

let createinfo = vk::InstanceCreateInfo::builder().applicationinfo(&appinfo); let instance = entry.createinstance(&createinfo, None).expect("Instance"); let devices = instance.enumeratephysicaldevices(); println!("{:?}", devices); `` You can run the example withcargo run`.

How does it work?

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

Features

cargo build will clone a specific release of MoltenVK compile and statically link it with your application.

If you want to compile MoltenVK yourself, you can use the external feature. cargo build --features external requires libMoltenVK to be visible (LD_LIBRARY_PATH).

How to update

To update the version of MoltenVK uses, change the following:

Contributing

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started.

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.