maveonair
maveonair

Reputation: 786

Compile C++ online in a Rails Application

I am looking for a compiler to compile C++ source code in a rails application. My idea is to get the source code as input, compile it and give the output back to the browser. Of course it should be secure and not really forwarded to the system C++ compiler. Is there maybe a ruby library which already do this job?

Upvotes: 0

Views: 751

Answers (2)

maveonair
maveonair

Reputation: 786

I will try the API[1] of ideone.com

[1] http://ideone.com/api

Upvotes: 0

orlp
orlp

Reputation: 117681

The problem is not the compiler. You're problem is safely executing the code, which is VERY (yes, caps and bold) hard with something as low as C/C++.

In fact, it's almost impossible, your best bet would be a complete sandbox in which the code is going to be executed. There is no ruby library for this AFAIK, and I highly doubt there ever will be one.

Upvotes: 2

Related Questions