You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Tyler Conant <go...@gmail.com> on 2014/11/24 19:41:03 UTC

Pure C implementation

I’m looking to serialize structures on a micro controller. I would like to specifically use thrift to do the serialization. The backend already uses thrift so I would prefer to keep with the same IDL. I see there is a C thrift library, however it uses Glib. Getting Glib to fit and compile on the micro may not be feasible. Does anyone know of a pure C implementation, I don’t need the service interface or transports,  only the serialization part of thrift?


Re: **** SPAM [ 10.8 ] **** Re: Pure C implementation

Posted by Mark Riley <ma...@eucleo.com>.
After messing around a bit bit with libmowgli (
https://github.com/atheme/libmowgli-2), I ended up with what you see here:

https://github.com/markrileybot/thrift-nano/blob/master/lib/c_nano/src/thrift/types.h
https://github.com/markrileybot/thrift-nano/blob/master/lib/c_nano/src/thrift/types.c

Basically, lists and maps are regions of memory to which data is copied.


On Mon, Nov 24, 2014 at 3:56 PM, Wilm Schumacher <wilm.schumacher@cawoom.com
> wrote:

> Hi,
>
> I didn't dive into the implementation, but I would have a question: how
> do you want to create the container classes, like list<> or map<>?
>
> Best,
>
> Wilm
>
> Am 24.11.2014 um 21:20 schrieb Mark Riley:
> > There's still a bit of work to be done.  I have the basic data
> structures,
> > a few protocols and a memory transport done.  My plan is to finish the
> > struct generator in the next week or so.  Hopefully, at that point, I'll
> > get some help with the service stuff and general cleanup.
> >
> > On Mon, Nov 24, 2014 at 3:07 PM, Roger Meier <ro...@bufferoverflow.ch>
> > wrote:
> >
> >> cool stuff!
> >> thrift-nano is a great thing, a pure C implementation was already
> >> requested by many users.
> >> I hope we can get this merged into Apache Thrift. Patches are welcome!
> >>
> >> cheers
> >> -roger
> >>
> >> Quoting David Itkin <di...@eucleo.com>:
> >>
> >>  Tyler,
> >>>
> >>> I work with someone that did just that.  Look here:
> >>>
> >>>    https://github.com/markrileybot/thrift-nano
> >>>
> >>> The author is not on this mailing list but will be soon.
> >>>
> >>> On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
> >>> wrote:
> >>>
> >>>  I’m looking to serialize structures on a micro controller. I would
> like
> >>>> to
> >>>> specifically use thrift to do the serialization. The backend already
> uses
> >>>> thrift so I would prefer to keep with the same IDL. I see there is a C
> >>>> thrift library, however it uses Glib. Getting Glib to fit and compile
> on
> >>>> the micro may not be feasible. Does anyone know of a pure C
> >>>> implementation,
> >>>> I don’t need the service interface or transports,  only the
> serialization
> >>>> part of thrift?
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> Thanks,
> >>>
> >>> David Itkin
> >>> ditkin@eucleo.com
> >>> (cel) 703-869-4675
> >>>
> >>
> >>
> >>
> >
> >
>



-- 
-mark

Re: **** SPAM [ 10.8 ] **** Re: Pure C implementation

Posted by Wilm Schumacher <wi...@cawoom.com>.
Hi,

I didn't dive into the implementation, but I would have a question: how
do you want to create the container classes, like list<> or map<>?

Best,

Wilm

Am 24.11.2014 um 21:20 schrieb Mark Riley:
> There's still a bit of work to be done.  I have the basic data structures,
> a few protocols and a memory transport done.  My plan is to finish the
> struct generator in the next week or so.  Hopefully, at that point, I'll
> get some help with the service stuff and general cleanup.
> 
> On Mon, Nov 24, 2014 at 3:07 PM, Roger Meier <ro...@bufferoverflow.ch>
> wrote:
> 
>> cool stuff!
>> thrift-nano is a great thing, a pure C implementation was already
>> requested by many users.
>> I hope we can get this merged into Apache Thrift. Patches are welcome!
>>
>> cheers
>> -roger
>>
>> Quoting David Itkin <di...@eucleo.com>:
>>
>>  Tyler,
>>>
>>> I work with someone that did just that.  Look here:
>>>
>>>    https://github.com/markrileybot/thrift-nano
>>>
>>> The author is not on this mailing list but will be soon.
>>>
>>> On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
>>> wrote:
>>>
>>>  I’m looking to serialize structures on a micro controller. I would like
>>>> to
>>>> specifically use thrift to do the serialization. The backend already uses
>>>> thrift so I would prefer to keep with the same IDL. I see there is a C
>>>> thrift library, however it uses Glib. Getting Glib to fit and compile on
>>>> the micro may not be feasible. Does anyone know of a pure C
>>>> implementation,
>>>> I don’t need the service interface or transports,  only the serialization
>>>> part of thrift?
>>>>
>>>>
>>>>
>>>
>>> --
>>> Thanks,
>>>
>>> David Itkin
>>> ditkin@eucleo.com
>>> (cel) 703-869-4675
>>>
>>
>>
>>
> 
> 

Re: **** SPAM [ 10.8 ] **** Re: Pure C implementation

Posted by Mark Riley <ma...@eucleo.com>.
There's still a bit of work to be done.  I have the basic data structures,
a few protocols and a memory transport done.  My plan is to finish the
struct generator in the next week or so.  Hopefully, at that point, I'll
get some help with the service stuff and general cleanup.

On Mon, Nov 24, 2014 at 3:07 PM, Roger Meier <ro...@bufferoverflow.ch>
wrote:

> cool stuff!
> thrift-nano is a great thing, a pure C implementation was already
> requested by many users.
> I hope we can get this merged into Apache Thrift. Patches are welcome!
>
> cheers
> -roger
>
> Quoting David Itkin <di...@eucleo.com>:
>
>  Tyler,
>>
>> I work with someone that did just that.  Look here:
>>
>>    https://github.com/markrileybot/thrift-nano
>>
>> The author is not on this mailing list but will be soon.
>>
>> On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
>> wrote:
>>
>>  I’m looking to serialize structures on a micro controller. I would like
>>> to
>>> specifically use thrift to do the serialization. The backend already uses
>>> thrift so I would prefer to keep with the same IDL. I see there is a C
>>> thrift library, however it uses Glib. Getting Glib to fit and compile on
>>> the micro may not be feasible. Does anyone know of a pure C
>>> implementation,
>>> I don’t need the service interface or transports,  only the serialization
>>> part of thrift?
>>>
>>>
>>>
>>
>> --
>> Thanks,
>>
>> David Itkin
>> ditkin@eucleo.com
>> (cel) 703-869-4675
>>
>
>
>


-- 
-mark

Re: **** SPAM [ 10.8 ] **** Re: Pure C implementation

Posted by Mark Riley <ma...@eucleo.com>.
There's still a bit of work to be done.  I have the basic data structures,
a few protocols and a memory transport done.  My plan is to finish the
struct generator in the next week or so.  Hopefully, at that point, I'll
get some help with the service stuff and general cleanup.

On Mon, Nov 24, 2014 at 3:07 PM, Roger Meier <ro...@bufferoverflow.ch>
wrote:

> cool stuff!
> thrift-nano is a great thing, a pure C implementation was already
> requested by many users.
> I hope we can get this merged into Apache Thrift. Patches are welcome!
>
> cheers
> -roger
>
> Quoting David Itkin <di...@eucleo.com>:
>
>  Tyler,
>>
>> I work with someone that did just that.  Look here:
>>
>>    https://github.com/markrileybot/thrift-nano
>>
>> The author is not on this mailing list but will be soon.
>>
>> On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
>> wrote:
>>
>>  I’m looking to serialize structures on a micro controller. I would like
>>> to
>>> specifically use thrift to do the serialization. The backend already uses
>>> thrift so I would prefer to keep with the same IDL. I see there is a C
>>> thrift library, however it uses Glib. Getting Glib to fit and compile on
>>> the micro may not be feasible. Does anyone know of a pure C
>>> implementation,
>>> I don’t need the service interface or transports,  only the serialization
>>> part of thrift?
>>>
>>>
>>>
>>
>> --
>> Thanks,
>>
>> David Itkin
>> ditkin@eucleo.com
>> (cel) 703-869-4675
>>
>
>
>


-- 
-mark

Re: **** SPAM [ 10.8 ] **** Re: Pure C implementation

Posted by Roger Meier <ro...@bufferoverflow.ch>.
cool stuff!
thrift-nano is a great thing, a pure C implementation was already  
requested by many users.
I hope we can get this merged into Apache Thrift. Patches are welcome!

cheers
-roger

Quoting David Itkin <di...@eucleo.com>:

> Tyler,
>
> I work with someone that did just that.  Look here:
>
>    https://github.com/markrileybot/thrift-nano
>
> The author is not on this mailing list but will be soon.
>
> On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
> wrote:
>
>> I’m looking to serialize structures on a micro controller. I would like to
>> specifically use thrift to do the serialization. The backend already uses
>> thrift so I would prefer to keep with the same IDL. I see there is a C
>> thrift library, however it uses Glib. Getting Glib to fit and compile on
>> the micro may not be feasible. Does anyone know of a pure C implementation,
>> I don’t need the service interface or transports,  only the serialization
>> part of thrift?
>>
>>
>
>
> --
> Thanks,
>
> David Itkin
> ditkin@eucleo.com
> (cel) 703-869-4675



Re: **** SPAM [ 10.8 ] **** Re: Pure C implementation

Posted by Roger Meier <ro...@bufferoverflow.ch>.
cool stuff!
thrift-nano is a great thing, a pure C implementation was already  
requested by many users.
I hope we can get this merged into Apache Thrift. Patches are welcome!

cheers
-roger

Quoting David Itkin <di...@eucleo.com>:

> Tyler,
>
> I work with someone that did just that.  Look here:
>
>    https://github.com/markrileybot/thrift-nano
>
> The author is not on this mailing list but will be soon.
>
> On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
> wrote:
>
>> I’m looking to serialize structures on a micro controller. I would like to
>> specifically use thrift to do the serialization. The backend already uses
>> thrift so I would prefer to keep with the same IDL. I see there is a C
>> thrift library, however it uses Glib. Getting Glib to fit and compile on
>> the micro may not be feasible. Does anyone know of a pure C implementation,
>> I don’t need the service interface or transports,  only the serialization
>> part of thrift?
>>
>>
>
>
> --
> Thanks,
>
> David Itkin
> ditkin@eucleo.com
> (cel) 703-869-4675



Re: Pure C implementation

Posted by David Itkin <di...@eucleo.com>.
Tyler,

I work with someone that did just that.  Look here:

   https://github.com/markrileybot/thrift-nano

The author is not on this mailing list but will be soon.

On Mon, Nov 24, 2014 at 1:41 PM, Tyler Conant <go...@gmail.com>
wrote:

> I’m looking to serialize structures on a micro controller. I would like to
> specifically use thrift to do the serialization. The backend already uses
> thrift so I would prefer to keep with the same IDL. I see there is a C
> thrift library, however it uses Glib. Getting Glib to fit and compile on
> the micro may not be feasible. Does anyone know of a pure C implementation,
> I don’t need the service interface or transports,  only the serialization
> part of thrift?
>
>


-- 
Thanks,

David Itkin
ditkin@eucleo.com
(cel) 703-869-4675