Musl and file creation time

Hello. I just found that file creation time can't be obtained with musl, but works with libc on Linux.

According to Metadata.create there is no such thing as "creation time" in POSIX stat(2), so it uses btime from statx(2) Linux-specific call (added in 4.11 kernel).

musl added statx(2) support a couple of months ago (7 years after 4.11 was released):
https://musl.libc.org/releases.html

February 29, 2024 (version 1.2.5)
This release adds extension functions statx

And rust still uses 1.2.3 from 2022.
https://doc.rust-lang.org/rustc/platform-support.html
x86_64-unknown-linux-musl 64-bit Linux with musl 1.2.3

So, my questions are:

  1. Would it be fixed when rust migrates to 1.2.5?
  2. How can I track it or file an issue?

thanks in advance

Hello @throwable-one,

The issue with obtaining file creation time in Rust when using musl is due to the fact that Rust's musl target (x86_64-unknown-linux-musl) is currently using version 1.2.3, which does not support the statx(2) system call. Musl added support for statx(2) in version 1.2.5. This issue should be resolved when Rust migrates to musl 1.2.5. You can track this issue or file a request in the Rust repository on GitHub.

1 Like

@jeannette9728miller thank you. I am not familiar with the Rust release process.
Can I simply create an issue "upgrade to musl 1.2.5" in The Rust Programming Language · GitHub and follow it?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.