#vulkan #metal

bin+lib ash-molten

Statically linked MoltenVK for Vulkan on Mac using Ash

9 releases (5 breaking)

0.30.0+38 Mar 24, 2020
0.7.2+1.1.0 Nov 13, 2020
0.5.0+41 May 11, 2020
0.4.0+41 Apr 6, 2020
0.1.0 Jun 28, 2019

#10 in macOS APIs

Download history 21/week @ 2020-08-11 10/week @ 2020-08-18 9/week @ 2020-08-25 17/week @ 2020-09-01 15/week @ 2020-09-08 3/week @ 2020-09-15 2/week @ 2020-09-22 10/week @ 2020-09-29 4/week @ 2020-10-06 6/week @ 2020-10-13 13/week @ 2020-10-20 5/week @ 2020-10-27 17/week @ 2020-11-03 336/week @ 2020-11-10 205/week @ 2020-11-17 150/week @ 2020-11-24

119 downloads per month


291 lines

🌋 ash-molten

Embark Embark Crates.io Docs dependency status Build status

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

Requires Xcode 12 and Mac OS 10.15 (Catalina) to compile.


  • 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.


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()
    .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);

You can run the example with cargo run.

How does it work?

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


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:

  • In build.rs, change let tag = "v1.0.37" to the new MoltenVK release tag name
  • Update the crate version in Cargo.toml
    • Bump the patch version
    • Set the version metadata to the MoltenVK release.
    • E.g. 0.2.0+37 -> 0.2.1+38.


Contributor Covenant

We welcome community contributions to this project.

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


Licensed under either of

at your option.


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.


~90K SLoC