Upgrading libc 0.1 to 0.2
Breaking0.1.12 → 0.2.191Breaking47Platform2Deprecated23New809Changed108Fixed244Other248
BreakingUpgrade verdict
46 breaking changes and 2 platform requirement changes.
In plain terms
- Removes many items from iOS, tvOS, watchOS, and visionOS that are only available on MacOS.
- Removes the unsupported exec* and fork calls from tvOS and watchOS.
- Removes unsound af_alg_iv trait implementations on Android and Linux that allowed out-of-bounds reads via safe functions.
- Removes most items that have been deprecated since before 0.2.100.
Must act Top 5 of 71 that need code or config changes
Requires Rust 1.65 from 0.2.184 (none stated before).
Adds rustc-std-workspace-core ^1.0.1.
Installs 1 package in all (was 0).
What you must change
Breaking46
Removes many items from iOS, tvOS, watchOS, and visionOS that are only available on MacOS.
Removes the unsupported exec* and fork calls from tvOS and watchOS.
exec*forkRemoves unsound af_alg_iv trait implementations on Android and Linux that allowed out-of-bounds reads via safe functions.
af_alg_ivRemoves most items that have been deprecated since before 0.2.100.
Removes INHERIT_ZERO on Dragonfly because it does not exist upstream.
INHERIT_ZERORemoves GNU-gated REG_* definitions on Musl riscv64.
REG_*Removes the non-existent REG_NARGS on Musl riscv64.
REG_NARGSDragonfly: Removes FreeBSD-only
Elf32_Lword, ip_mreq_source, and IP_ constants.Elf32_Lwordip_mreq_sourceIP_Dragonfly: Removes private VM type bindings.
Linux: Removes
KERN_REALROOTDEV and VM_LAPTOP_MODE.KERN_REALROOTDEVVM_LAPTOP_MODEVxWorks: Removes non-user-facing (kernel) API.
Remove RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64.
RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64WASI: Remove nonexistent clocks.
MIPS Musl: Remove rogue definition of SIGSTKFLT.
SIGSTKFLTNetBSD: Remove BPF constants.
NetBSD: Remove *_MAXID constants and AT_SUN_LDPGSIZE.
*_MAXIDAT_SUN_LDPGSIZENetBSD: Remove IFF_NOTRAILERS.
IFF_NOTRAILERSNetBSD: Remove vm_size_t.
vm_size_tFreeBSD: Remove JAIL_{GET,SET}_MASK, _MC_FLAG_MASK.
JAIL_{GET,SET}_MASK_MC_FLAG_MASKAIX: Remove duplicate constant definitions FIND and ENTER.
FINDENTERs390x musl: Remove O_FSYNC.
O_FSYNCs390x musl: Remove RTLD_DEEPBIND.
RTLD_DEEPBINDMusl: Remove O_FSYNC on RISC-V-32 (use O_SYNC instead).
O_FSYNCO_SYNCMusl: Remove RTLD_DEEPBIND on RISC-V-32.
RTLD_DEEPBINDNuttX: Remove pthread_set_name_np.
pthread_set_name_npRemove one unused import after the edition 2021 bump.
Apple: remove rmx_state.
rmx_stateopenbsd: syscall has been removed in upcoming OpenBSD 7.5.
Remove asmjs-unknown-emscripten target.
Drops support for the armv7-apple-ios target.
armv7-apple-iosRemoves the AIX specific definition of sigval.
sigvalRemoves the obsolete private a.out define on illumos.
Drops support for the Rumprun target.
Removes the deprecated winapi part on win32.
winapiChanges the type of
BPF_ALIGNMENT to size_t on AIX to match upstream and other platforms.BPF_ALIGNMENTDisables mach.h API on Apple mobile OSs.
mach.hReplaces the RUST_LIBC_UNSTABLE_* environment variables with --cfg configuration options.
RUST_LIBC_UNSTABLE_*libc_unstable_musl_v1_2_3libc_unstable_gnu_time_bitsCorrects NetBSD _lwp_park ts parameter from *const timespec to *mut timespec.
_lwp_parktimespecChanges overflowing Linux GNU PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG constants from u8 to c_uint.
PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIGu8c_uintNetBSD: Make statvfs.f_spare non-public.
statvfs.f_spareNetBSD: Replace REG_ENOSYS with REG_ILLSEQ.
Fixes the MAP_HASSEMAPHORE name on Hurd, renaming the exposed constant.
MAP_HASSEMAPHOREFixes mismatched types of SA_* constants on ulibc Mips.
SA_*Changes f_* constants to uint from ulong on linux/musl/s390x.
Changes MSG* constant types for musl and emscripten, following up on #2963.
MSG_OOBMSG_PEEKMSG_DONTROUTEMSG_EORMSG_WAITALLMSG_NOSIGNALMSG_TRUNCMSG_CTRUNCMoves termios2 struct and ioctl constants to linux::arch::* modules.
termios2linux::archPlatform2
Adds support for Emscripten versions v4.0.12 through v6.0.11.
MSRV: document the MSRV of the stable channel to be 1.63.
Deprecations to plan for
Deprecated23
Adds back NOTE_PCTRLMASK on FreeBSD with a deprecation warning.
NOTE_PCTRLMASKDeprecates AIX
_kernel_simple_lock._kernel_simple_lockDeprecates integer
*_MIN/*_MAX constants in favor of associated constants like c_int::MAX.*_MIN*_MAXc_int::MAXDeprecates Fuchsia types that do not exist upstream.
Deprecates Hurd
fallocate64, which does not exist on the platform.fallocate64Deprecates redundant Hurd
glob64 types and routines.glob64Deprecates L4Re LFS bindings.
Deprecates OpenBSD
syscall, mincore, and KERN_NSELCOLL, all removed upstream.syscallmincoreKERN_NSELCOLLDeprecates the POSIX-obsoleted
tmpnam and tempnam on Unix.tmpnamtempnamDeprecates CLONE_INTO_CGROUP and CLONE_CLEAR_SIGHAND because they overflow their types and will change to a larger size later.
CLONE_INTO_CGROUPCLONE_CLEAR_SIGHANDDeprecates Dragonfly compatibility aliases CPUCTL_RSMSR and UTX_DB_LASTLOG.
CPUCTL_RSMSRUTX_DB_LASTLOGApple: Deprecate TIOCREMOTE.
TIOCREMOTEApple: Correct the deprecated attribute for iconv (a97a0b53).
deprecatediconvFreeBSD: Deprecate TIOCMGDTRWAIT and TIOCMSDTRWAIT.
TIOCMGDTRWAITTIOCMSDTRWAITLinux: MAP_32BIT is only defined on x86 on non-x86 architectures.
MAP_32BITFreeBSD: Deprecate TCP_PCAP_OUT and TCP_PCAP_IN.
TCP_PCAP_OUTTCP_PCAP_INLinux: Deprecate obsolete packet filter interfaces.
Linux: deprecate kernel modules syscalls.
FreeBSD: Deprecate the CAP_UNUSED* and CAP_ALL* constants.
Deprecates iconv_open on Apple targets.
iconv_openDeprecates mach_task_self on Apple targets.
mach_task_selfUpdates mach deprecation notices for things that were removed in main.
machDeprecates XU_NGROUPS on DragonFly.
XU_NGROUPS