Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library version constraints #15

Open
ianprime0509 opened this issue Jun 30, 2023 · 0 comments
Open

Library version constraints #15

ianprime0509 opened this issue Jun 30, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@ianprime0509
Copy link
Owner

GIR has metadata indicating which version of a library introduced an API. To make it easier for users to remain compatible with older library versions, it would be nice to expose this in a way that allows users to exclude APIs from newer versions.

A rough idea of how this might be done is something like

pub const someBinding = if (comptime max_version.supports("4.10")) contentOfBinding else @compileError("Only supported in GTK 4.10 and later");
@ianprime0509 ianprime0509 added the enhancement New feature or request label Jun 30, 2023
@ianprime0509 ianprime0509 added this to the v1.0.0 milestone Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant