SwiftLatex, TexLyre and StellarLatex seem to be exactly this. Apparently this is something a lot of people want to see in the world, awesome stuff. I wonder what's the performance like between native XeLaTex and these wasm version and if it will be Overleaf's demise if these solutions can be easily self-hosted by organizations without worrying about the server getting bogged down by compile jobs.