[cfe-dev] Potential Summer of Code Project: Ruby bindings for libclang

Alp Toker alp at nuanti.com
Wed Feb 26 18:36:23 PST 2014


On 26/02/2014 19:05, Brian Gesiak wrote:
> Argyrios, Dmitri,
>
> Thanks so much for the feedback! I'm trying to flesh out the expansion 
> idea as best I can; I'll reply once I have something presentable.

Hi Brian,

Here's a blue-sky idea:

A lightweight C interface suited to dynamic language bindings that 
exposes the AST and its properties as a simple object hierarchy with few 
statically typed objects or enumerations.

The C interface would comprise just a handful of functions to get/set(?) 
properties and iterate through child nodes.

With this design, additions or removals to clang AST internals wouldn't 
require the interface itself or bindings to be updated, solving one of 
the limitations with current libclang that tends to miss parts of the 
AST until someone gets around to exposing them.

Language bindings built on top would feel more native and potentially be 
more performant without the need to wrap and bind different C types, so 
the Ruby binding would then become an exercise in Ruby coding with more 
flexibility on the final representation rather than wrapping a wide C API.

(The functions could live alongside libclang and share all the 
bookeeping so it doesn't need to be seen as a libclang2).

I don't know what Argyrios will make of this, it's probably a love/hate 
kind of idea but should be feasible ;-)

Alp.



>
> - Brian Gesiak
>
>
> On Wed, Feb 26, 2014 at 12:51 AM, Argyrios Kyrtzidis 
> <akyrtzi at gmail.com <mailto:akyrtzi at gmail.com>> wrote:
>
>     Brian,
>
>     I appreciate your interest, but I think that a Ruby bindings
>     project will realistically be less likely to gather enough
>     interest compared to other project ideas.
>
>     You mentioned "I'd like to work on expanding the libclang API in
>     general", if you were to expand this in a project proposal it
>     could be more promising.
>
>     On Feb 24, 2014, at 5:48 PM, Brian Gesiak <modocache at gmail.com
>     <mailto:modocache at gmail.com>> wrote:
>
>>     Hello all,
>>
>>     My name is Brian Gesiak. I'm a research student at the University
>>     of Tokyo, and I'm very excited for Google Summer of Code this
>>     year (see
>>     http://www.google-melange.com/gsoc/homepage/google/gsoc2014 for
>>     details)! I'd like to propose a potential project and see if
>>     anyone on this list has any feedback.
>>
>>     I'd like to work on libclang bindings. I think the bindings are a
>>     common starting point for developers who wish to get started with
>>     Clang. I'm hoping that improving them could have a big impact.
>>
>>     Specifically, I'd like to work on the following three milestones:
>>
>>     1. Ruby bindings for libclang, added to the Clang repository and
>>     packaged a RubyGem
>>     2. Refactoring the Python bindings; removing FIXMEs, breaking
>>     cindex.py into multiple files for easier reading
>>     3. Improving documentation on libclang; adding READMEs to the
>>     Python and Ruby bindings, as well as sample applications
>>
>>     If I can achieve the above three milestones with some time to
>>     spare, I'd like to work on expanding the libclang API in general.
>>
>>     Before becoming a research student, I used to work as an iOS
>>     developer. In recent years many in the Objective-C community have
>>     used Ruby to make development tools. I'm hoping that adding Ruby
>>     bindings and improving documentation for libclang will have a
>>     large impact on the community.
>>
>>     However, I'm not sure how big of a priority libclang is for this
>>     project. It's not mentioned on the list of open projects (see
>>     http://clang.llvm.org/OpenProjects.html), so please let me know
>>     if I'm barking up the wrong tree. LLVM is my top choice as a
>>     mentoring organization for Google Summer of Code this year, so if
>>     libclang isn't a viable project I'll try to propose something else.
>>
>>     Thanks for your time! Any and all feedback is greatly appreciated.
>>
>>     - Brian Gesiak
>>
>>     _______________________________________________
>>     cfe-dev mailing list
>>     cfe-dev at cs.uiuc.edu <mailto:cfe-dev at cs.uiuc.edu>
>>     http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-dev mailing list