While updating crates for a project, I noticed that time >= 0.3.6 began to depend on this crate. After reviewing what it was, I found that the APIs currently used on main are problematic for any consumers who ship Rust code in apps distributed via Apple's stores.
proc_pidinfo is what Apple considers a "private API" (see the top of its header location), which means that if they detect a library linking to or referencing the symbols during review, they will reject the upload. The sysinfo crate had a similar issue before.
This PR replaces the use of proc_pidinfo with public Mach APIs instead. mach_task_self and task_threads are both referenced in Apple's public facing documentation and kernel headers.
Hello,
While updating crates for a project, I noticed that
time
>= 0.3.6 began to depend on this crate. After reviewing what it was, I found that the APIs currently used onmain
are problematic for any consumers who ship Rust code in apps distributed via Apple's stores.proc_pidinfo
is what Apple considers a "private API" (see the top of its header location), which means that if they detect a library linking to or referencing the symbols during review, they will reject the upload. Thesysinfo
crate had a similar issue before.This PR replaces the use of
proc_pidinfo
with public Mach APIs instead.mach_task_self
andtask_threads
are both referenced in Apple's public facing documentation and kernel headers.