nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

libs: Add static compatiblity check for Rust

Open no1wudi opened this issue 5 months ago • 28 comments

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:

  1. Struct reserved size is 2 pointer size, is it sufficient?
  2. Which option should we preferred to use? Such as SYSTEM_TIME64 and FS_LARGEFILE?
  3. Should we enable it by default to cover more cases in build CI? It can prevent introduce compatiblity issues.

Please feel free to comment

no1wudi avatar Aug 30 '24 07:08 no1wudi