tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.25k stars 900 forks source link

net: rebase work of PR#4273 #4442

Closed leongross closed 3 weeks ago

leongross commented 1 month ago

Pick up the work @scottfeldman already did on the network rework and extend it. Because tinygo has improved syscall support for Linux systems for a while, start implementing the systemer interface.

issues

1. unknown file type

$ ./net
dial: dial tcp4 127.0.0.1:31337: waiting for unsupported file type

caused by https://cs.opensource.google/go/go/+/master:src/internal/poll/fd_poll_runtime.go;l=80?q=%22waiting%20for%20unsupported%20file%20type%22&ss=go%2Fgo src/internal/poll/fd_poll_runtime.go: pollDesc.wait src/internal/poll/fd_poll_runtime.go: pollDesc.waitWrite src/internal/poll/fd_unix.go: fd.Write

leongross commented 1 month ago

Example application I use to test out simple network support on x86_64 linux systems: https://gist.github.com/leongross/ed23eafe85105ead0a63c88e4964657b