csharpc

Remaining flips (#423)

Every library area below moves from csharpc’s own copy in src/Csharpc/corelib to the pinned .NET 11 GA framework IL (ADR 0023), in one PR. Each area lands as its own commit series on feat/flip-framework-il, checked locally first (build, tests/size.sh, touched samples and neighbours at -O0/-O2/via IL, wasm32 for numeric, pointer-size or slicer changes). Each gets its own docs/il-first/<library>.md row with the NativeAOT column, and the shadow files it replaces are deleted.

What stays csharpc’s: the compiler, IL front-end, driver, toolchain, the C runtime (GC, exceptions, threads, OS boundary) and the contract layer (reflection/type system, task/async glue, interop).

Area Status Issue
ManualResetEventSlim, SpinWait, Barrier, other sync types done locally: ManualResetEventSlim, SpinWait, CountdownEvent, Barrier, ReaderWriterLock, LockCookie from the framework (SemaphoreSlim in #419); docs/il-first/System.Threading.md #414
BFloat16, Decimal32/64/128 done: docs/il-first/System.Numerics.IeeeTypes.md (also hosts every generic-math interface’s static defaults; follow-ups #420, #425) #405
Hashtable, ArrayList, BitArray done: docs/il-first/System.Collections.Hashtable.md, System.Collections.ArrayList.md (SR.Format contract for every slice) #372, #373
Guid done locally: from the framework; docs/il-first/System.Guid.md #416
Culture, number formatting and parsing (deletes the digits bridge) done locally: cultures, culture data, casing, collation, CharUnicodeInfo, IdnMapping, StringInfo, and number formatting and parsing (System.Number, the primitives’ ToString/TryFormat/Parse/TryParse hosted from IL; the digits bridge and runtime/parse.c deleted, Enum.Parse in C#) from the framework (docs/il-first/System.Globalization.md). BigInteger’s standard formats, decimal to and from double and Math.Round(double, digits, mode) stay with the BigInteger and floating-point row #426
DateTime, calendars, TimeSpan parsing and formatting done locally with culture: DateTimeFormatInfo, every calendar, DateTimeFormat, DateTimeParse, TimeSpanFormat/TimeSpanParse; DateOnly/TimeOnly/TimeSpan parsing hosted from IL; the corelib keeps those types’ representation and their formatting members; TimeSpan’s own formatter is still the corelib’s (#447) #426, #447
Text and encoding, Convert, string helpers, hashing, BigInteger, floating-point math done locally: Ascii, Base64, CompositeFormat, StandardFormat (System.Text.Ascii.md) the Encoding family with Utf8 (System.Text.Encoding.md) Convert (System.Convert.md) Rune (System.Text.Rune.md) the string and char helpers (System.String.md) BigInteger (System.Runtime.Numerics.md) and the floating-point members of float, double, Math and MathF (System.Math.md) done; hashing is all crypto (with the crypto row); Vector2/3/4 stay shadows (#451). Follow-ups #432, #433, #434, #435, #446, #448, #450, #453 #423
Tracing done locally: EventSource, EventListener, the event counters and TraceLogging from the framework (docs/il-first/System.Diagnostics.Tracing.md: a disabled EventPipe contract, reflection over the event source, security review and measurements); follow-ups #454 (throughput vs NativeAOT), #455 (the runtime’s own event sources) #423
IO above the libc boundary done locally: part 1 (streams, readers, writers) and part 2 (File, Directory, FileInfo/DirectoryInfo, FileStream, Path, RandomAccess, SafeFileHandle, enumeration over the C# libSystem.Native contract corelib/IO/SystemNative.cs; security review and measurements in System.IO.md); Windows (the Windows CoreLib slice over kernel32) waits for CI; linking the pack’s libSystem.Native instead stays the owner’s decision (21-ownership.md) #315
Net/Http above csharpc’s socket engine done locally on Linux and macOS: System.Net.Sockets, System.Net.NameResolution and (Linux) System.Net.NetworkInformation from the framework’s IL over the C# libSystem.Native socket contract corelib/Net/SystemNative.Net.cs (epoll/kqueue: csharpc’s socket engine below the framework’s); System.Net.Http and System.Net.Primitives were IL already; security review and measurements in System.Net.Sockets.md. Windows keeps the Winsock shadows until the runtime has IOCP (#441); System.Uri stays the corelib’s until a route for System.Private.Uri exists (#442) #423
Crypto, X.509, SslStream (the OS-native TLS default stays the owner’s call, #143, #144) done locally on Linux: part 1 (hashes, HMAC, KMAC, SHAKE, symmetric ciphers and AEAD, RandomNumberGenerator, PBKDF2/HKDF from the framework’s IL over the C# OpenSSL contract corelib/Crypto/CryptoNative*.cs; System.Security.Cryptography.md); parts 2 and 3 done locally on Linux, together (X.509, chains, OCSP, PKCS#7, RSA, ECC, DSA, Oid, AsymmetricAlgorithm, SslStream, NegotiateAuthentication from the framework’s IL over the same contract plus CryptoNative.Ssl.cs/CryptoNative.Bio.cs and the GSS-API contract corelib/Net/NetSecurityNative.cs; security review and measurements in System.Net.Security.md); macOS, Windows and WASI keep the copies (#449) #423, #449