3 ms·
There seems to be libc in the repo but many functions are TODO https://github.com/udem-dlteam/pnut/tree/main/portable_libc https://github.com/udem-dlteam/pnut/t
by Cloudef 2y ago
There seems to be libc in the repo but many functions are TODO https://github.com/udem-dlteam/pnut/tree/main/portable_libc https://github.com/udem-dlteam/pnut/tree/main/portable_libc
Otherwise the builtins seems to be here https://github.com/udem-dlteam/pnut/blob/main/runtime.sh https://github.com/udem-dlteam/pnut/blob/main/runtime.sh
FYI all your functions are not "C functions", but rather POSIX functions. I did not expect it to be complete, but it's still impressive for what it is.
- westurner 2y agoThere are Linux ports of the plan9 `syscall` binary, which is presumably necessary to implement parts of libc with shell scripts: https://stackoverflow.com/questions/10196395/os-system-calls-from-bash-script/76524660#76524660 https://stackoverflow.com/questions/10196395/os-system-calls... I don't remember there being a way to keep a server listening on a /dev/tcp/$ip/$port port, for sockets from shell scripts with shellcheck at least