Using Node.js' JS implementation
One of the consistent problems has been compatibility with the node:fs API. While ZenFS strives for 100% compatibility, maintaining and working towards that is a massive amount of work.
Node.js already has the JS implementation.
In the future, I think ZenFS would benefit from using the Node.js implementation, then emulating the C++ bindings. This means we could have complete Node.js compatibility while maintaining the same powerful features.
This also significantly reduces maintainer workload.
Community feedback is welcome!
Postponing this because importing the Node.js implementation will definitly not be possible for a long time, see https://github.com/nodejs/node/issues/58523.
then emulating the C++ bindings
I think of nothing but pain and suffering when I think node C++ bindings. So idk.
However, I do have a litte good news for you. Deno has a node compatibility layer here where they basically port every node API to ESM (typescript actually). I know because, coincidentally, to get ZenFS working with deno I ported node globSync's implementation to deno (which is now merged!). It might work for stuff like globSync, but for stuff like read/write its polyfilled to Deno APIs rather than C++ APIs so might not be all that useful. Probably would at least be a good reference point if you do try porting nodejs code.