{"id":15691772,"url":"https://github.com/macournoyer/llvmruby","last_synced_at":"2025-05-08T01:15:13.956Z","repository":{"id":437755,"uuid":"59438","full_name":"macournoyer/llvmruby","owner":"macournoyer","description":"LLVM bindings for Ruby","archived":false,"fork":false,"pushed_at":"2008-10-24T02:20:59.000Z","size":611,"stargazers_count":8,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T01:15:07.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://llvmruby.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macournoyer.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-10-04T04:16:07.000Z","updated_at":"2019-11-04T20:29:55.000Z","dependencies_parsed_at":"2022-07-04T16:09:31.568Z","dependency_job_id":null,"html_url":"https://github.com/macournoyer/llvmruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Fllvmruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Fllvmruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Fllvmruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Fllvmruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macournoyer","download_url":"https://codeload.github.com/macournoyer/llvmruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978784,"owners_count":21834917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:24:37.913Z","updated_at":"2025-05-08T01:15:13.933Z","avatar_url":"https://github.com/macournoyer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"* What's LLVMRuby\n\nLLVMRuby is a set of bindings making the LLVM compiler infrastructure \n(http://llvm.org) usable from Ruby.  This extention allows using LLVM\nas an abstract assembler and reflects a good chunk of the LLVM class\nhierarchy into Ruby.  Included is an example of using this to build\na simple JIT compiler, written entirely in Ruby, which is able to \ninteract with the native Ruby 1.8/1.9 data types.\n\n* How to build\n\nYou must get LLVM from svn and build it separately:\n\n  $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm \n\nMake sure that you configure LLVM with PIC enabled:\n  \n  $ ./configure --enable-pic\n\nAdd the llvm bin directory to your path, extconf needs to be able to find llvm-conf:\n\n  $ export PATH=$PATH:/$LLVMDIR/Release/bin\n\nRun rake\n\n  $ rake\n\nRun the tests (you will need Rake installed)\n\n  $ rake test\n\nLook in test.rb to see examples of use and start messing around.  The\nproject was recently reorganized in gem format with Ruby files in lib,\nand C/CPP and extension in ext.  You will need to either load the \nlibrary as a gem or make sure that both lib and ext dirs are in your\nload path.\n\n* Caveats\n\nI created this using very latest LLVM (from svn, soon to be 2.4).  Other \nversions may not work.  I have been trying to get the 2.3 released package \nto work, only one conditional typedef is required, but it complaining about \nfPIC stuff :(\n\nI primarily develop this on my home machine which is 64bit Fedora.  I \noccasionally test it on a 32bit CentOS machine, and recently tested it \non a 32bit MacBook.  It built and passed tests with no issues.  My\nknowledge of building either Ruby or LLVM on Windows is minimal.  It\nshould be doable, but I don't believe LLVM currently is usable with\nVC++, which is the main compiler for Ruby on Windows, so you may run\ninto fun times trying to figure out a good way to make that go.\n\n* Things that definitely do not work right now\n\nNo attempt has been made to properly free LLVM objects.  This probably\nisn't hard, LLVM api has easy to deal with memory management.  Many LLVM\nobjects end up owned by modules/execution engine and shouldn't be freed\nnormally anyway.\n\nThere needs to be a lot more exception raising when arguments are of wrong\nnumber/type.\n\nMalformed LLVM functions will cause the program to abort, even just \nfrom calling verify on a module.  This seems like a bug in LLVM.\nVerification in theory is slow and should be used only for debugging, but\nit would nice if tests did not abort and die because of missing block\nterminators or whatever. \n\n* Copying\n\nSee the file COPYING\n\n* Author\n\nFor questions or answers, my email is: tomatobagby@gmail.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacournoyer%2Fllvmruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacournoyer%2Fllvmruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacournoyer%2Fllvmruby/lists"}