For lots of language servers that doesn't have a pure js or wasm version (like c++), it's a common approach to use websockets to communicate with a actual backend (which runs clangd, jdtls, etc)
Previously we are using https://github.com/TypeFox/monaco-languageclient to patch monaco-editor