Go channels, goroutines and GC available in Nim

gccgo provides an API to its Go runtime implementation so I used that to create a library made of C and Go code that can be used from C: https://github.com/stefantalpalaru/golib

Using golib and some macro abuse, I brought Go's channels and goroutines to Nim in a form that's quite close to the original syntax: https://github.com/stefantalpalaru/golib-nim

Now golib-nim can't use any of the provided garbage collectors (it runs with --gc:none, but where's the fun in that?) so I had to implement Go's garbage collector in Nim: https://github.com/stefantalpalaru/Nim

And here's the pull request: https://github.com/Araq/Nim/pull/2851

To sum up the dependencies:

  • building Nim with the new GC doesn't need any dependency
  • using the new GC requires golib-nim, golib and gccgo (GCC with Go support)
  • using golib-nim without a GC (--gc:none) doesn't require any Nim modification
  • using golib-nim with a GC (--gc:go) requires the Nim modification

2015-05-31 21:42:29