mojo
mojo copied to clipboard
[Feature Request] Add `endianness` to `TargetInfo`
Review Mojo's priorities
- [X] I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
I believe getting the endianness of a target is useful for working with binary data and the like.
This method could look something like:
struct Endianness:
alias little = 0
alias big = 1
# in TargetInfo
fn endianness() -> Endianness:
### What is your motivation for this change?
```shell
Knowing if a target wants little or big endian is useful when working with binary data.
Any other details?
No response
Sounds like a great suggestion and is simple to implement. Thanks