Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple, clean interface for ruby-llvm.
Ruby C C++
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext/linker
lib/llvm
samples
test
.gitignore
.yardopts
Gemfile
Gemfile.lock
LICENSE
Quality.rake
README.md
Rakefile
config.reek
ruby-llvm-script.gemspec

README.md

LLVM Script

AuthorMac Malone
CopyrightCopyright (c) 2012 Mac Malone
LicenseBSD 3-clause (see {file:LICENSE})

Introduction

This project aims to make a simple, clean interface on top of ruby-llvm to make it easier for one to write ruby-llvm programs and libraries. It is also very well documented, if I do say so myself.

ruby-llvm-script has been tested on OS X 10.7 using the following Ruby interpreters:

  • MRI 1.8.7-p357
  • MRI 1.9.3-p194

Roadmap

  • Make sure everything works.
  • Requests appreciated.

Getting Started

Noticeruby-llvm-script is currently not released as a gem (will be soon). You will, for now, have to install it from the source if you wish to use it.

If you would like to see what ruby-llvm-script feels like before getting started, take a look at the Hello World program. Otherwise, you will need to install LLVM and ruby-llvm-script first. After you are done with that, you might wish to take a look at the breakdowns of the example programs in the samples directory:

  1. Hello World: hello.rb
  2. Factorial: factorial.rb
  3. I/O: io.rb
  4. Conditionals: cond.rb
  5. Function Pointers: fp.rb

It is advised to look at them in the above order because as each builds upon the last.

API Documentation

The ruby-llvm-script API documentation, generated by YARD can be found here. Also, a bleeding-edge version created from the github repository can at RubyDoc.info: http://www.rubydoc.info/github/tophat/ruby-llvm-script.

Going Deeper

You might want to look at the ruby-llvm documentation at http://jvoorhis.com/ruby-llvm and the LLVM assembly language reference at http://llvm.org/docs/LangRef.html if you want to get in real deep.

Something went wrong with that request. Please try again.