-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add Clangd-wasm example, build LS images with GHA #734
base: main
Are you sure you want to change the base?
Conversation
I did some investigation around clangd and the possibility to run it in the browser already, here's what I've found:
I was able to run a small C program compiled into wasm, properly accessing the VSCode virtual filesystem. But since it doesn't support some basic features like threads, it failed to run any "advanced" binaries The only option currently seems to be https://github.com/guyutongxue/clangd-in-browser, but I wonder if it's able to interact with the filesystem, and how? |
@CGNonofr Great, thanks for sharing 👍 If this becomes fully working in the browser at one point in time (via whatever tech) it will be awesome.
It brings its own virtual file system. You can read and write files (done here: https://github.com/TypeFox/monaco-languageclient/blob/clangd-example/packages/examples/src/clangd/worker/clangd-server.ts) |
Isn't there any way to provide our own implementation instead? which would access the VSCode filesystem? That would be a shame to have to watch the filesystem to register the files one by one |
The wasm already contains the header files meaning when you have it loaded you can read all the header files as far as I understand it. Something must be adjusted in the build process to change that, I guess. I did not investigate any of this so far. |
But now we can start to play with it and try things... |
e11ab45
to
6987fd3
Compare
6987fd3
to
6f804b7
Compare
@CGNonofr I will open up a second PR with the wrapper improvements and base this one on it. I need to fix some build problems first. |
0391847
to
5a9438b
Compare
ff7bd8e
to
a43b165
Compare
f599c58
to
2843ca9
Compare
bacc90c
to
f5ae2d7
Compare
- Condense code - Make use of new wrapper features
- Increase clangd timeout to 150 minutes
- new example: socket.io for file protocol to non worker target - define file system endpoints - clangd LS uses message port for communication - Use wtm new ComChannelEndpoints for handling async communication of message channels or workers - worker transfers files to client via message channel - clangd example: list open files below editor
f5ae2d7
to
fa127b8
Compare
This PR adds the clangd wasm port from https://github.com/guyutongxue/clangd-in-browser into a new example. The client side of the example is already clean-up / aligned to the other example. TODO: The server side code needs some polishing.
In addition the following things have been added along:
Once we have clangd in integrated, we have together with pyright and eclispe.jdt.ls enough complex language server (worker and web socket conn.) available to integrate different ways of file synchronizations. This PR enables more future enhancements.