savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
153 stars 12 forks source link

Add `Platform.is_arm` and `Platform.is_x86` functions. #469

Closed jemc closed 8 months ago

jemc commented 8 months ago

These functions allow for writing cross-platform code that needs to vary across these different CPU architectures.

This should be fairly rare as a need, but some FFI struct layouts do need to vary by CPU architecture, so it is sometimes needed.