Understand librashader C API versioning (API vs ABI)
masterThe C API uses two separate monotonically increasing version numbers exported via headers to manage compatibility:
LIBRASHADER_CURRENT_VERSION(API Version): Specifies the API version. An increase in this value is guaranteed to be backwards compatible for the sameLIBRASHADER_CURRENT_ABI. New features in option structs require the version to be $\ge$ the version where the feature was introduced; otherwise, a default value is passed.LIBRASHADER_CURRENT_ABI(ABI Version): Specifies the ABI version. Any change to this value is a breaking change.
Safety Mechanism: The librashader_ld loader checks if LIBRASHADER_CURRENT_ABI matches the loaded binary. If they do not match, the library will not load. A value of 0 indicates a 'null' instance where all operations are no-ops (occurring when no compatible implementation is found).