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

Add a feature for enabling compilation for no_std #5

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Sep 5, 2023

This commit adds two new features: "std" (which is enabled by default) and "libm". When "std" is enabled, floating point intrinsics are used from libstd. When "libm" is enabled, it brings in the pure Rust libm implementation to handle floating point instrinsics in software mode.

By disabling the "std" feature and enabling "libm", this crate can be effectively used on no_std platforms, like embedded systems.

This is a breaking change, as it adds an "std" default feature that, when disabled without enabling "libm", causes a compile error. Users who are currently using zeno with "default-features = false" without preparation will have their compilation break.

Rel: dfrg/swash#4

This commit adds two new features: "std" (which is enabled by default)
and "libm". When "std" is enabled, floating point intrinsics are used
from libstd. When "libm" is enabled, it brings in the pure Rust libm
implementation to handle floating point instrinsics in software mode.

By disabling the "std" feature and enabling "libm", this crate can be
effectively used on no_std platforms, like embedded systems.

This is a breaking change, as it adds an "std" default feature that,
when disabled without enabling "libm", causes a compile error. Users who
are currently using zeno with "default-features = false" without
preparation will have their compilation break.

Rel: dfrg/swash#4

Signed-off-by: John Nunley <[email protected]>
@notgull
Copy link
Contributor Author

notgull commented Sep 16, 2023

@dfrg Any chance that you can review this?

1 similar comment
@notgull
Copy link
Contributor Author

notgull commented Oct 8, 2023

@dfrg Any chance that you can review this?

Copy link
Owner

@dfrg dfrg left a comment

Choose a reason for hiding this comment

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

If it’s good enough for kurbo… :) Thanks again for doing the legwork to make these work in no_std. It’s much appreciated.

@dfrg dfrg merged commit 943d84f into dfrg:master Oct 8, 2023
@notgull notgull deleted the no_std branch October 8, 2023 21:47
@notgull
Copy link
Contributor Author

notgull commented Nov 23, 2023

@dfrg Can you publish this change?

@dfrg
Copy link
Owner

dfrg commented Nov 29, 2023

published 0.3.0

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