# Yarv and C

**URL:** <https://www.ruby-forum.com/t/yarv-and-c/111506>\
**Category:** Ruby\
**Created:** [August 8, 2007, 2:16am UTC](https://www.ruby-forum.com/t/yarv-and-c/111506 "2007-08-08T02:16:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 8, 2007, 2:16am UTC](https://www.ruby-forum.com/t/yarv-and-c/111506/1 "2007-08-08T02:16:30Z")

</div>

I have a somewhat large library written in C that I want to be able to  
call from ruby and I have used SWIG in the past. Right now if I did  
this with swig it would take me several  
days, and I don’t want to risk this becoming obsolete in 3 months.

Am I right that yarv is the future? Can SWIG be used with yarv or  
would it  
be better for me to build my library into yarv? (modify the language)

I don’t want to have to write new glue code when the next release of  
ruby (or yarv) is out.

Any opinions or pointers are greatly appreciated.

Thanks in advance,  
Tom

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 8, 2007, 9:03am UTC](https://www.ruby-forum.com/t/yarv-and-c/111506/2 "2007-08-08T09:03:57Z")

</div>

Hi,

In message “Re: yarv and C”  
on Wed, 8 Aug 2007 09:15:06 +0900, removed\_email\_address@domain.invalid writes:

|Am I right that yarv is the future? Can SWIG be used with yarv or  
|would it  
|be better for me to build my library into yarv? (modify the language)  
|  
|I don’t want to have to write new glue code when the next release of  
|ruby (or yarv) is out.

I am not sure what you mean here. At least you don’t have to modify  
your extension for YARV (1.9).

```
          matz.
```
