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

Make rustler_sys forward compatible #536

Merged
merged 1 commit into from
May 18, 2023

Conversation

filmor
Copy link
Member

@filmor filmor commented May 14, 2023

Makes rustler_sys forward compatible by falling back to the highest available version as long as the NIF major version matches.

@filmor filmor force-pushed the rustler-sys-forward-compat branch from cd32cd4 to 2c28705 Compare May 14, 2023 14:45
Copy link
Member

@philss philss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

I think we could also update the CI to run against the latest RC version. WDYT?
For what I checked, the latest one is 26.0-rc3,

nif_version.0, nif_version.1, MAX_SUPPORTED_VERSION.0, MAX_SUPPORTED_VERSION.1
);
nif_version = MAX_SUPPORTED_VERSION;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍

// Activate all config flags for the supported NIF versions
for minor in 0..=nif_version.1 {
println!("cargo:rustc-cfg=nif_{}_{}", nif_version.0, minor);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@filmor
Copy link
Member Author

filmor commented May 14, 2023

If #537 is agreed on, we don't need to merge this one. If it requires more discussion, we can merge this and publish it as rustler-sys-2.3.1 tomorrow to have things working reasonably well when OTP26 comes out.

@filmor filmor merged commit 7869fb0 into rusterlium:master May 18, 2023
@filmor filmor deleted the rustler-sys-forward-compat branch May 18, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants