Skip to content
New issue

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

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

Already on GitHub? # to your account

Add new optional feature "endian-num" #23

Open
natkeo559 opened this issue Jul 15, 2024 · 0 comments
Open

Add new optional feature "endian-num" #23

natkeo559 opened this issue Jul 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@natkeo559
Copy link
Owner

The endian-num crate offers some feature to effectively enforce endianness of certain types. This is something that may easily be integrated into can-types to provide endianness guarantees since some ECUs can be strictly Big-Endian or Little-Endian. Developers using this can, in theory, have some reassurance that their usage of can-types is behaving as expected.

For example, a type using endian-num has a Little-Endian byte order even on Big-Endian machines, or vice versa.

Implementing this might require adding additional conditional feature flags or macros. Some initial testing also indicates that a new branch build could be the simplest implementation.

Caveats:

  • Using endian-num might limit crate compatibility to linux since the types we'd use are behind a "linux-types" feature gate, although, I'm not sure if this would even be a valid concern.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant