airbnb / sparsam

Fast Thrift Bindings for Ruby

Home Page:https://sparsam-docs.surge.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sparsam Build Status Coverage Status Gem Version

New Thrift bindings and generator for Ruby!

Super basic Example

See the docs folder for more detailed information

$ sparsam-gen my_struct.thrift
$ bundle exec irb
irb(main):001:0> require './gen-ruby/my_struct_types'
=> true
irb(main):002:0> require 'sparsam'
=> true
irb(main):003:0> obj = MyStruct.new
=> #<MyStruct:0x007fa70d924148>
irb(main):004:0> serialized = obj.serialize # turn object into string
=> "\x00"
irb(main):005:0> obj2 = Sparsam::Deserializer.deserialize( MyStruct, serialized ) # deserialize string into obj
=> #<MyStruct:0x007fa70e3ee998>

About

Fast Thrift Bindings for Ruby

https://sparsam-docs.surge.sh/

License:Other


Languages

Language:C++ 64.4%Language:Ruby 10.6%Language:Yacc 10.1%Language:C 6.7%Language:Lex 4.8%Language:Makefile 1.4%Language:CMake 1.2%Language:Thrift 0.6%Language:Shell 0.1%