[0] https://chiselapp.com/user/rkeene/repository/tuapi/doc/trunk...
https://bellard.org/jslinux/vm.html?url=alpine-x86.cfg&mem=1...
and
By the famous Fabrice Bellard who is the creator of QuickJS, QEMU, FFMPEG and many other brilliant and fascinating tools!
This project, on the other hand, is the opposite (and kind of a joke): a set of Linux utilities mostly written in JavaScript.
I am working something similar in Go, and writing an educative blog post series about it: https://serversfor.dev/linux-inside-out/
But yes, in the BSDs, Linux and Windows, the kernel has a concept of a current working directory.
https://github.com/briandfoy/PerlPowerTools
I guess there are related projects such as busybox which contain a collection of utilities implemented in a single binary. There are others such as toybox, and various alternatives in different languages, or with different licenses to choose from.
Making a micro Linux distro [for RISC-V]
This is the Linux Userland reimplemented in JavaScript