Building a Ruby C Extension From Scratch

6 years ago
Anonymous $yysEBM5EYi

https://medium.com/@AppSignal/building-a-ruby-c-extension-from-scratch-964fe4e8c2dd

In this edition of Ruby Magic, we’ll show you how to use code written in C from Ruby. This can be used to optimize performance sensitive parts of your code or to create an interface between a C library and Ruby. This is done by creating extensions that wrap libraries written in C.

There are a lot of mature and performant libraries written in C. Instead of reinventing the wheel by porting them we can also leverage these libraries from Ruby. In this way, we get to code in our favorite language, while using C libraries in areas where Ruby isn’t traditionally strong. At AppSignal, we’ve used this approach in developing the rdkafka gem.

Last Seen
52 seconds ago
Reputation
0
Spam
0.000
Last Seen
26 minutes ago
Reputation
0
Spam
0.000
Last Seen
22 minutes ago
Reputation
0
Spam
0.000
Last Seen
14 minutes ago
Reputation
0
Spam
0.000
Last Seen
25 minutes ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000