It’s never early to prepare for JavaScript complete takeover.
MobiusHorizons•1h ago
Very cool. Good use of quickjs, although it would have been cool if it somehow didn’t need a libc and just used the syscall interface. Makes me want to give that a try.
Reading the code, I was surprised to see that cd was implemented by calling out to the os library. I assumed that was something the shell or at least userspace handled. At what level does the concept of a “current directory” exist?
It's at the kernel level. Each process has its own current working directory. On Linux, these CWD values are exposed at `/proc/[...]/cwd`. This value affects the resolution of relative paths in filesystem operations at a syscall level.
kalterdev•1h ago