Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Packaging C++ library into a Rails application for Heroku use

asked the next thing from Heroku support the other day:

I have an app that will require a client library written in C++. I have doubts can that be done with Heroku. Is it possible at all, any alternatives how can a C++ library be installed and used by an app with Heroku?

And I got the next answer:

We currently don't have a good way to do this. You'll need to figure out how to package into your app and compile static x64 binaries into the repo.

I haven't done that before. Does anyone have any good pointers how package a C++ library into a Rails app so it can be used with Heroku?

Thanks.

like image 705
Pod Avatar asked Apr 06 '11 09:04

Pod


Video Answer


1 Answers

To wrap the C++ library in Ruby, you want Rb++.

Alternately, you can wrap the C++ library in C and then wrap that with Ruby-FFI.

I'm not sure what, if anything, one can do to get the native extensions compiled on Heroku. I'd contact their support and ask.

like image 68
jdc Avatar answered Oct 13 '22 10:10

jdc