Reminds me of what Fabrice bellard did a few years ago, Linux and windows in JavaScript. https://bellard.org/jslinux/
Or this https://github.com/copy/v86
Except jslinux running actual thing.
Except jslinux running actual thing.