Documentation for pre-built version (#35)

This commit is contained in:
Marnix Kuijs 2020-11-15 00:53:14 +01:00 committed by GitHub
parent 2ba14801cd
commit 277846f209
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View file

@ -16,8 +16,11 @@ documentation = "https://docs.rs/ash-molten"
ash = "0.31"
[features]
external = []
pre-built = []
# Build features
# Without build feature enabled MoltenVK will be build from source
external = [] # Supply own MoltenVK lib
pre-built = [] # Download pre-built MoltenVK from github release
[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"

View file

@ -49,7 +49,9 @@ You can run the example with `cargo run`.
### Features
`cargo build` will clone a specific release of [MoltenVK](https://github.com/KhronosGroup/MoltenVK) compile and statically link it with your application.
`cargo build` will clone a specific release of [MoltenVK](https://github.com/KhronosGroup/MoltenVK) compile and statically link it with your application.
`cargo build --features pre-built` will download a pre-built version of MoltenVK from a release of ash-molten.
`cargo build --features external` provide own MoltenVK library.
If you want to compile [MoltenVK](https://github.com/KhronosGroup/MoltenVK) yourself, you can use the `external` feature. `cargo build --features external` requires `libMoltenVK` to be visible (`LD_LIBRARY_PATH`).
@ -57,12 +59,23 @@ If you want to compile [MoltenVK](https://github.com/KhronosGroup/MoltenVK) your
To update the version of [MoltenVK](https://github.com/KhronosGroup/MoltenVK) uses, change the following:
- In `build.rs`, change `let tag = "v1.0.37"` to the new [MoltenVK release](https://github.com/KhronosGroup/MoltenVK/releases) tag name
- In `build.rs`, change `static VERSION = "1.1.0"` to the new [MoltenVK release](https://github.com/KhronosGroup/MoltenVK/releases) 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`.
### Updating pre-built version
To update the prebuilt version uses, change the following:
- Follow the steps mentioned above.
- Download the MoltenVK XCFramework from, for example, the Vulkan SDK for Mac or build [MoltenVK](https://github.com/KhronosGroup/MoltenVK/) yourself.
- in the case of downloading it from an external source make sure MoltenVK version matches `static VERSION`.
- From the XCFramework folder, from the built version of MoltenVK, zip the folders of platforms that need to be supported individually.
- Create a release with the following tag MoltenVK-{version number}.
- Upload the zip files to the release with the MoltenVK-{version number} tag.
## Contributing
[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](../CODE_OF_CONDUCT.md)