nuttx
nuttx copied to clipboard
libs: Add static compatiblity check for Rust
Summary
This patch adds a static compatiblity check for most of structures from NuttX, which is used by Rust.
Currently, for most of them have a reserved field, which is for possible future use, you can refer to https://github.com/no1wudi/libc/blob/39277b5357cb2aa7af1bd8344956ec292c35abed/src/unix/nuttx/mod.rs#L71 for more details.
I think we should define the initial version carefully, to avoid compatiblity problems in future as much as possible:
- Struct reserved size is 2 pointer size, is it sufficient?
- Which option should we preferred to use? Such as SYSTEM_TIME64 and FS_LARGEFILE?
- Should we enable it by default to cover more cases in build CI? It can prevent introduce compatiblity issues.
Please feel free to comment