You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(c/net): restore common native networking APIs - #44
Restore common native networking APIs and verify every retained symbol on macOS arm64 and Linux amd64/arm64.
The implementation includes:
Generate one classified networking binding per platform from macOS 14 and Bootlin glibc 2.24 headers, using unmodified llcppg.
Replace duplicate handwritten declarations under the established function names, remove the Native duplicates, retain the original *SockaddrIn arguments for Bind/Accept, and derive socket-storage padding constants from each native layout.
Remove kernel/private C entry points and the explicitly approved Linux bindresvport6 declaration, which has no libc export.
Check every retained C function's link address and prototype ABI, all generated type layouts and constants, global symbols, and union accessors; exercise binary socket I/O, IPv4/IPv6 numeric resolution, interface enumeration, and TCP loopback.
LLGo v1.0.8 (c171abfa130108bc6451e01fcf15a8a3474eb0a7) passes executed GC and nogc tests on all three targets. These runs use the root c files from #45 at 99ddac92c7335a53a1c996174e1753bcd72c5050; merge #45 first to supply c.Iovec. Standalone CI currently stops at undefined: c.Iovec while that prerequisite is unmerged. This draft changes only c/net, with complete symbol checks making missing exports and ABI regressions visible.
MeteorsLiu
changed the title
feat(c/net): add generated libc networking bindings
feat(c): add native net, OS and pthread bindings
Oct 19, 2026
This draft changes only c/net. Merge #45 first to supply the shared c.Iovec; validation used its root c files at 99ddac92c7335a53a1c996174e1753bcd72c5050 together with the current networking sources.
The current update removes duplicate Native declarations, preserves the original Bind/Accept IPv4 pointer signatures, and fixes Linux socket-storage padding constants. Existing character-pointer and Send/Recv length contracts remain compatible. Kernel/private C entry points and the explicitly approved Linux bindresvport6 declaration are excluded.
Executed llgo test -count=1 -v ./c/net runs pass on macOS arm64, Linux amd64 and Linux arm64, both with GC and -tags=nogc, using LLGo v1.0.8 (c171abfa). Every retained C function is covered by a link-address and native-prototype check; layouts, constants, globals and generated union accessors also have coverage. The PR remains draft.
Standalone CI currently stops at c/net/libc_linux_amd64.go:886:16: undefined: c.Iovec because #45 has not merged. The six passing package test runs include that documented prerequisite.
MeteorsLiu
changed the title
feat(c/net): add native libc networking bindings
feat(c/net): generate native networking bindings for three targets
Oct 19, 2026
MeteorsLiu
changed the title
feat(c/net): generate native networking bindings for three targets
feat(c/net): add classified native networking bindings
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore common native networking APIs and verify every retained symbol on macOS arm64 and Linux amd64/arm64.
The implementation includes:
Nativeduplicates, retain the original*SockaddrInarguments forBind/Accept, and derive socket-storage padding constants from each native layout.*c.Charstring contracts,Send/Recvlength types, untyped socket constants, and macOS byte-order declarations; rootc.Charandc.Printfremain unchanged.bindresvport6declaration, which has no libc export.LLGo v1.0.8 (
c171abfa130108bc6451e01fcf15a8a3474eb0a7) passes executed GC andnogctests on all three targets. These runs use the rootcfiles from #45 at99ddac92c7335a53a1c996174e1753bcd72c5050; merge #45 first to supplyc.Iovec. Standalone CI currently stops atundefined: c.Iovecwhile that prerequisite is unmerged. This draft changes onlyc/net, with complete symbol checks making missing exports and ABI regressions visible.