For the plugin itself: various builds of gcc-bridge.so are shipped with the gcc-bridge compiler jar and extracted to a temp folder as needed. We have builds for linux-x86 and linux-i686, and I know that we have contributors who have built a version for os x. Windows remains unattempted...
GCC needs to be installed, and on 64-bit system, gcc-multilib also needs to be present so we can generate code that uses 32-bit pointers, as GCC-Bridge backs pointers with JVM arrays which support only 32-bit (31-bit I guess) indexing on all platforms. On Ubuntu, you'd need: sudo apt-get install gcc-4.6 gfortran-4.6 gcc-4.6.multilib For Renjin, packages are distributed as JARs so we run a build server (http://packages.renjin.org) that churns out pre-built JARs for all the R packages in the major R repositories. I don't know if would be possible to do something similar for JRuby. -Alex On Tuesday, February 2, 2016 at 2:31:01 AM UTC+1, Charles Nutter wrote: > > On Mon, Feb 1, 2016 at 11:55 PM, Alexander Bertram > <al...@bedatadriven.com <javascript:>> wrote: > > You can basically tell the compiler to map a C struct to a given java > class, > > for example, mapping CRuby's VALUE to org.jruby.RubyBasicObject and > import > > > > GimpleCompiler compiler = new GimpleCompiler(); > > compiler.addRecordClass("__VALUE", RubyBasicObject.class); > > compiler.addMethod("TYPE", CRuby.class, "TYPE"); > > > > You can then define: > > > > class CRuby { > > public static int TYPE(RubyBasicObject obj) { > > if(obj instance of RubyBoolean) return 1; > > if(obj instance of RubyHash) return 2; > > // etc... > > } > > } > > Very nice! I'm eager to give this a try with a simple extension and > see how it feels. > > > We monkey with the GNU R header files to make replace macros with > function > > declarations so they can mapped to JVM methods. > > Yeah we'd turn the weird ones into functions bound to JRuby operations > too. > > I have been in transit all day so I did not get to read much... how > does one get this gcc plugin installed? RubyGems are built when > installed, so we'd need to be able to hook into gcc at that point. > > - Charlie > -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To unsubscribe from this group and stop receiving emails from it, send an email to jvm-languages+unsubscr...@googlegroups.com. To post to this group, send email to jvm-languages@googlegroups.com. Visit this group at https://groups.google.com/group/jvm-languages. For more options, visit https://groups.google.com/d/optout.