Skip to content

Enable long double for all targets #130

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

Merged

Conversation

emiltayl
Copy link
Contributor

@emiltayl emiltayl commented May 5, 2025

Since libffi v3.4.6, long double types have been defined for all targets. This pull request exposes long double types for all targets from libffi-rs as well.

This is not a breaking change, but it would still constitute a minor version bump as far as I understand. Let me know if you want me to target the "next" branch instead.

There are no tests for long double as they are (mostly) not really supported by Rust. It is currently possible to write tests for targets where long double is the same size as double (MSVC, ARMv7 and some PPC configurations?). Further targets should be supported when/if f128 is stabilized. For x86(_64) I cannot see that there are any concrete plans to enable support for a f80 type.

Should long doubles be tested? Eventually kept as they are now (available, but without further support), removed from libffi-rs entirely, or removed from middle::Type as they are not available from Rust? This question might deserve its own issue. I created an issue to discuss how long doubles should be handled in libffi-rs.

Since libffi v3.4.6 `long double` types have been defined for all
targets. This commit exposes `long double` types for all targets from
libffi-rs as well.

For the commit enabling `long double` for all targets, see
libffi/libffi@cd78b53
@emiltayl emiltayl marked this pull request as draft May 5, 2025 14:58
@arihant2math
Copy link
Collaborator

Yeah I don’t see this as a breaking change, targeting master is good.

@emiltayl emiltayl marked this pull request as ready for review May 6, 2025 14:34
@emiltayl
Copy link
Contributor Author

emiltayl commented May 6, 2025

Okay, thank you! I guess this is good to go for now then.

@arihant2math arihant2math merged commit 7b0bfc5 into tov:master May 6, 2025
23 checks passed
@emiltayl emiltayl deleted the upstream-long-double-for-all-targets branch May 7, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants