Ruby代码中的C / C ++? [英] C/C++ within Ruby code?

查看:112
本文介绍了Ruby代码中的C / C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C / C ++将是写一些Ruby应用程序的性能关键方面的好选择。我知道这是可能的。



我想知道如何将C / C ++代码添加到Ruby代码中;任何其他语言。



在开源项目中,你注意到了什么实际应用吗?

解决方案

除了扩展Ruby之外,还有其他两个资源:




C/C++ would be good option to write some of the performance critical aspects of a Ruby Application. I know this is possible.

I would like to know how to add C/C++ code into Ruby code; any other language for that matter.

Are there any practical applications of this which you noticed in open source projects or else?

解决方案

Besides "Extending Ruby", here are two other resources:

  • README.EXT (extension.rdoc) - shows you more about how to build C extensions. A good compliment to "Extending Ruby"
  • Ruby Inline - This is a library that tries to make it easier to build C extensions by having you call methods in ruby to compile C code.

这篇关于Ruby代码中的C / C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆