{"id":29210636,"url":"https://github.com/embarkstudios/ash-molten","last_synced_at":"2025-07-02T21:07:21.848Z","repository":{"id":35019730,"uuid":"184604379","full_name":"EmbarkStudios/ash-molten","owner":"EmbarkStudios","description":"🌋 Statically linked MoltenVK for Vulkan on Mac using Ash 🦀","archived":false,"fork":false,"pushed_at":"2024-09-12T16:42:01.000Z","size":2841,"stargazers_count":102,"open_issues_count":10,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-27T21:59:09.377Z","etag":null,"topics":["ash","hacktoberfest","macos","moltenvk","rust","vulkan"],"latest_commit_sha":null,"homepage":"http://embark.rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmbarkStudios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-02T15:19:27.000Z","updated_at":"2025-05-16T15:55:37.000Z","dependencies_parsed_at":"2023-01-15T12:09:00.065Z","dependency_job_id":"45484505-d1b2-433a-9e27-619d0a1902a4","html_url":"https://github.com/EmbarkStudios/ash-molten","commit_stats":{"total_commits":90,"total_committers":18,"mean_commits":5.0,"dds":0.6777777777777778,"last_synced_commit":"2da15dbee44a35d029d74250828d00de721998f3"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/EmbarkStudios/ash-molten","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fash-molten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fash-molten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fash-molten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fash-molten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmbarkStudios","download_url":"https://codeload.github.com/EmbarkStudios/ash-molten/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fash-molten/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263215299,"owners_count":23431895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ash","hacktoberfest","macos","moltenvk","rust","vulkan"],"created_at":"2025-07-02T21:07:21.082Z","updated_at":"2025-07-02T21:07:21.828Z","avatar_url":"https://github.com/EmbarkStudios.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Allow this file to not have a first line heading --\u003e\n\u003c!-- markdownlint-disable-file MD041 --\u003e\n\n\u003c!-- inline html --\u003e\n\u003c!-- markdownlint-disable-file MD033 --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# `🌋 ash-molten`\n\n**Statically link with [MoltenVK]**\n\n[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)\n[![Embark](https://img.shields.io/badge/discord-ark-%237289da.svg?logo=discord)](https://discord.gg/dAuKfZS)\n[![Crates.io](https://img.shields.io/crates/v/ash-molten.svg)](https://crates.io/crates/ash-molten)\n[![Docs](https://docs.rs/ash-molten/badge.svg)](https://docs.rs/ash-molten)\n[![dependency status](https://deps.rs/repo/github/EmbarkStudios/ash-molten/status.svg)](https://deps.rs/repo/github/EmbarkStudios/ash-molten)\n[![Build status](https://github.com/EmbarkStudios/ash-molten/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/ash-molten/actions)\n\n\u003c/div\u003e\n\n`ash-molten` is built on top of [ash] and exposes a new entry point to statically link with [MoltenVK].\n\nRequires Xcode 14 and Mac OS 10.15 (Catalina) to compile.\n\n## Why?\n\n* You want to compile down to a single binary that doesn't need any environment variables to bet set.\n* You just want to try out [MoltenVK] without needing to setup the SDK.\n\n## Why not?\n\n* [ash] already supports [MoltenVK] via runtime linking. Runtime linking is the preferred way of using Vulkan because the loader can be updated at anytime without needing to recompile.\n* `ash-molten` doesn't have access to the validation layers and therefore can not output any debug information.\n\n## How?\n\n```rust\nlet entry = ash_molten::MoltenEntry::load().expect(\"Unable to load Molten\");\nlet app_name = CString::new(\"Hello Static Molten\").unwrap();\n\nlet appinfo = vk::ApplicationInfo::builder()\n    .application_name(\u0026app_name)\n    .application_version(0)\n    .engine_name(\u0026app_name)\n    .engine_version(0)\n    .api_version(vk_make_version!(1, 0, 0));\n\nlet create_info = vk::InstanceCreateInfo::builder().application_info(\u0026appinfo);\nlet instance = entry.create_instance(\u0026create_info, None).expect(\"Instance\");\nlet devices = instance.enumerate_physical_devices();\nprintln!(\"{:?}\", devices);\n```\n\nYou can run the example with `cargo run`.\n\n## How does it work?\n\n`ash-molten` links statically with [MoltenVK], it then uses `vkGetInstanceProcAddr` to resolve all the function pointers at runtime.\n\n### Features\n\n`cargo build` will clone a specific release of [MoltenVK] compile and statically link it with your application.\n`cargo build --features pre-built` will download a pre-built version of MoltenVK from a release of ash-molten.\n`cargo build --features external` provide own MoltenVK library.\n\nIf you want to compile [MoltenVK] yourself, you can use the `external` feature. `cargo build --features external` requires `libMoltenVK` to be visible (`LD_LIBRARY_PATH`).\n\n### How to update\n\nTo update the version of [MoltenVK] uses, change the following:\n\n* In `build.rs`, change `static VERSION = \"1.1.0\"` to the new [MoltenVK release](https://github.com/KhronosGroup/MoltenVK/releases) tag name\n* Update the crate version in `Cargo.toml`\n  * Bump the patch version\n  * Set the version metadata to the MoltenVK release.\n  * E.g. `0.2.0+1.1.9` -\u003e `0.2.1+1.1.10`.\n* Before you can submit the PR, you must also update the prebuilt version. See the next section.\n\n### Updating pre-built version\n\nTo update the prebuilt version of MoltenVK that ash-molten uses, change the following:\n\n* Follow the steps mentioned above.\n* Download the MoltenVK XCFramework from, for example, the Vulkan SDK for Mac or build [MoltenVK] yourself.\n  * in the case of downloading it from an external source make sure MoltenVK version matches `static VERSION`.\n* From the XCFramework folder, from the built version of MoltenVK, zip the folders of platforms that need to be supported individually.\n* Create a release with the tag: MoltenVK-{version number}.\n* Upload the zip files to the release with the MoltenVK-{version number} tag.\n\n## Contributing\n\n[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\nWe welcome community contributions to this project.\n\nPlease read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n[MoltenVK]: https://github.com/KhronosGroup/MoltenVK\n[ash]: https://github.com/MaikKlein/ash\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembarkstudios%2Fash-molten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembarkstudios%2Fash-molten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembarkstudios%2Fash-molten/lists"}