Skip to content

Instantly share code, notes, and snippets.

@vodafon
Last active January 11, 2017 19:39
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save vodafon/89c2a9fb22cb74303c68 to your computer and use it in GitHub Desktop.
Save vodafon/89c2a9fb22cb74303c68 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