Skip to content

Instantly share code, notes, and snippets.

@brainwire
Forked from vodafon/Readme.md
Last active August 27, 2015 06:32
Show Gist options
  • Save brainwire/b4d451910d1e6f700ae4 to your computer and use it in GitHub Desktop.
Save brainwire/b4d451910d1e6f700ae4 to your computer and use it in GitHub Desktop.
Linking #GoLang lib in #Ruby
go build -buildmode=c-shared -o sum.so sum.go
ruby link.rb
package main
import "C"
//export sum
func sum(a, b int) int {
return a + b
}
func main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment