[cfe-dev] RFC: A proposal for a Clang-based service architecture

Argyrios Kyrtzidis akyrtzi at gmail.com
Tue Jun 26 19:56:12 PDT 2012

On Jun 12, 2012, at 3:43 AM, Chandler Carruth wrote:

> Greetings all!
> What follows is a fairly lengthy and detailed design document for a proposed persistent Clang server (or clangd in unix-terms) to serve as infrastructure for increasingly advanced and interactive C++ tools. It should generalize and build upon libclang, and will allow us to effectively target Vim, Emacs, and other editors. This is something we're planning to pursue in the near term, so I'd appreciate any and all feedback.
> Here is a Google Docs link you can use to view and comment on the proposal:
> https://docs.google.com/document/d/1kNv2jJK0I0JGnxJxU6w5lUOlrIBoecU4fi9d_o5e2-c/edit
> Its interim home is on github here, where you can see the history and the actual rest version in all its glory:
> https://github.com/chandlerc/llvm-designs/blob/master/ClangService.rst
> I've also attached the text for email-based comments.

Very interesting! A couple of comments:

-Please do make sure that the IPC layer is high-level and general enough to allow implementing it using XPC services at the Mac platform.

> Clients using only the narrow API should be able to switch trivially between the two libraries to get IPC vs. internal process behavior.
> Wrapping the C++ client libraries will be a API and ABI stable C library. This will very closely resemble (and ideally end up largely source-compatible with) the highest-level libclang APIs

I doubt that being source-compatible between libclang API and clang-server API is a useful enough goal to justify limiting the design of the clang-server API to current libclang APIs.
Clients will end up designed specifically for libclang or the clang-server, (e.g shouldn't a clang-server client be designed to be fault-tolerant ?) and IMHO the primary clang-server API should be designed to be asynchronous ("equivalent" synchronous functions can optionally be added on top).

> Thanks!
> -Chandler
> <ClangService.rst.txt>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120626/de23971b/attachment.html>

More information about the cfe-dev mailing list