[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: csharp swig bindings

From: Toby Johnson <toby_at_etjohnson.us>
Date: 2006-07-11 22:16:44 CEST

Jelmer Vernooij wrote:
> On Tue, 2006-07-11 at 15:28 -0400, Toby Johnson wrote:
>
>> I was surprised to find that no one has worked on C# bindings for
>> Subversion, now that SWIG supports that language. I started to look into
>> what the effort would be to work on this, assuming I could start with
>> the Perl and Ruby bindings as examples, but unfortunately my knowledge
>> of C is limited and my knowledge of Makefiles even more so.
>>
>> So I guess my first question is whether I'm in over my head... maybe my
>> understanding of SWIG is flawed but I figured once bindings were there
>> for one language, others would be more or less trivial, but looking at
>> the libsvn_swig_xx "utility" functions this doesn't seem to be the case.
>> It seems that not only is a lot of non-trivial C required, but a rather
>> deep understanding of the Subversion internals.
>>
>> Is my assessment of the effort involved here correct, and if so, is
>> there anyone else with more knowledge of Subversion who has attempted to
>> generate the C# bindings? I'd be willing to help out with the C# coding
>> and some of the simpler C stuff if there is any other interest in this
>> from someone who understands the Subversion internals.
>>
> From previous experience with C#, I'd say writing bindings without SWIG
> might actually be easier. C#'s P/Invoke is very powerful.
>
> See the attached C# file for a quick 'n' dirty, but working, example.
>
> Cheers,
>
> Jelmer
>

Thanks, that doesn't look so bad after all. This email
<http://svn.haxx.se/dev/archive-2003-02/0119.shtml> turned me off from
exploring the P/Invoke route but after I reread, I realized they were
looking at Windows only. Going the Mono route certainly looks much easier.

I was also hoping that SWIG would help with the tedium of keeping the
libraries in sync w/ the official Subversion library but it looks like
that's unavoidable.
Received on Tue Jul 11 22:16:30 2006

This is an archived mail posted to the Subversion Dev mailing list.