Previous: 167/173 (before reflect/gob changes).
Full count including internal: 165/241 pass. 68 internal packages fail (most are "use of internal package not allowed" when tested from outside).
| Package | Reason | Fixable? |
|---|---|---|
| crypto/rsa | batch-run cache flake (passes individually) | N/A |
| crypto/tls | batch-run cache flake (passes individually) | N/A |
| debug/buildinfo | uses unexported runtime internals | No |
| hash/maphash | needs runtime hash seed | No |
| plugin | requires dlopen, incompatible with static linking | No |
| runtime/coverage | not in moxie's goroot (instrumentation) | No |
| runtime/race | not in moxie's goroot (sanitizer) | No |
| time/tzdata | missing linker symbol time.registerLoadFromEmbeddedTZData | No |
$MOXIEROOT/src/syscall/socket_hosted.go — full BSD socket API via libc exports.
Constants, types, and functions for socket(), bind(), listen(), accept4(),
connect(), setsockopt/getsockopt, epoll, netlink, etc.
125 Go stdlib files copied to $MOXIEROOT/src/net/.
cgo_stub_moxie.go provides cgoAvailable=false stubs.
Pure Go resolver only — no cgo DNS.
common.go expanded with full ConnectionState fields, cipher suite constants,
and Config.Clone() method. tls.go provides stub Conn type.
ticket.go provides SessionState/ClientSessionState stubs.
33 Go stdlib files + 6 sub-packages (cgi, cookiejar, fcgi, httptest, httputil, pprof)
copied to $MOXIEROOT/src/net/http/. httptrace and internal also present.
plus minimal write wrappers needed by stdlib (Set, New, MakeSlice, MakeMap, MakeMapWithSize, Append, AppendSlice, Copy, Call, Recv, etc.)
types so stdlib consumers (encoding/json, encoding/xml, etc.) compile.
Copied from Go stdlib, patched scan.go to remove reflect.MakeSlice dependency. Default scan case returns error instead of attempting reflection-based scanning.
Stub package at $MOXIEROOT/src/encoding/gob/gob.go provides Encoder/Decoder
types and Register/RegisterName functions. All operations panic at runtime.
net/rpc compiles but gob-based codecs will panic.
Once net compiled, these all fell into place automatically: net/textproto, net/mail, net/smtp, mime/multipart, crypto/tls, crypto/x509, net/http (+ cgi, cookiejar, fcgi, httptest, httptrace, httputil, pprof), expvar, net/rpc, net/rpc/jsonrpc, log/syslog, text/tabwriter
"encoding/": true, // merge parent so encoding/gob/ can be overridden
"encoding/gob/": false, // replaced with panic stubs
"fmt/": false, // patched scan.go (no write-reflect in scanning)
acceptor domain (single thread, owns epoll):
epoll_wait() -> ready fds
for each ready fd:
if listener fd -> accept() new conn
if conn fd -> read into buffer
if request complete -> send to work channel
if work channel full -> spawn(worker, work_chan)
worker domain (single thread, owns assigned connections):
for req := range work_chan:
parse HTTP request
call handler
write response
return conn to acceptor or close
Backpressure drives scaling. No thread pool. No work-stealing. Spawn when full, retire when idle.