Skip to content

Conversation

@camshaft
Copy link
Contributor

@camshaft camshaft commented Dec 7, 2023

Description of changes:

Rather than having #[cfg(...)] attributes everywhere for platform-specific code, this change moves all of those branches into the features module and exports a consistent interface, regarless if the platform supports the feature or not. This makes the rest of the code base much easier to reason about and check for correctness, since we're not branching at compile time. Since all of the feature values are const this should be equivalent to what we had before in terms of performance.

Testing:

Since this is mostly just a refactor all of the existing tests should suffice in showing it's working as intended.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft force-pushed the camshaft/platform-features branch 4 times, most recently from 614845e to f982bb2 Compare December 7, 2023 21:07
@camshaft camshaft marked this pull request as ready for review December 7, 2023 21:08
@camshaft camshaft force-pushed the camshaft/platform-features branch from f982bb2 to 2b345a5 Compare December 7, 2023 21:28
@camshaft camshaft force-pushed the camshaft/platform-features branch from 2b345a5 to 9d1f32c Compare December 7, 2023 21:39
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