Project

golden

0.0
No commit activity in last 3 years
No release in over 3 years
Golden is a development tool that makes it easier to wrap Go libraries for use in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14.0
~> 12.3.3
~> 3.0

Runtime

~> 1.14
~> 0.8.0
~> 1.1
~> 0.5.0
 Project Readme

Golden Gem Version Donate with Bitcoin

Description

Golden is a development tool that makes it easier to wrap Go libraries for use in Ruby.

Features

  • Usage similar to the every day package manager
  • Converts .go files to .so shared libraries
  • Manages library exported function metadata in convenient JSON format
  • Update notifications as of 0.6.1 - If you have a version prior to 0.6.1, update now to be notified when future updates are pushed to rubygems!

Usage

Building a slightly modified version of the "libsum.go" example

package main

import "C"

//export add
func add(a int, b int) int {
  return a + b
}
//export subtract
func subtract(a, b int) int { // as of 0.5.2 this shorthand parameter declaration is supported!
  return a - b
}


func main() {}

On the command line:

cd libsum
golden build libsum

cd ../golden-example
golden install libsum

Additionally, as of version 0.6.0, you can add libraries built manually or shared by another developer with the add command:

golden add path/to/library/directory

or

golden add path/to/library/directory/golden.json

Then, reference the library in your ruby project:

require "golden"

class GoldenExample
  def initialize
    libsum = Golden.require("libsum")
    puts libsum.add(1,2) #prints 3
  end
end

Installation

From rubygems:

[sudo] gem install golden

or from the git repository on github:

git clone git://github.com/gmikeska/golden.git
cd golden
bundle install
rake install

License

Golden is covered by the BSD license, also see the LICENSE file. The specs are covered by the same license as ruby/spec, the MIT license.

Donations

Donate with Bitcoin