Help porting Go to Haiku?

I realise this is a long shot, but would an expert Go developer/contributer/hacker be willing to help me port Go to Haiku? It’s totally a hobbyist operating system, but would be a fun project, and shouldn’t be too hard. Well, it’ll be hard because I tried and came to the conclusion that I’m over my head, hence me asking for help.

It wouldn’t necessarily be a from-scratch situation, since members of the Haiku community did manage to get Go ported prior to the “Go shall be written in Go” event, which is totally awesome by the way. But that means Haiku’s version of Go is ancient by now. Current Go on Haiku code: https://github.com/haikuports/haikuports/tree/master/dev-lang/golang

I tried to create the port and added Haiku as a target, and was able to get the initial bootstrap to compile, but that was it. Some pros of this effort:

  • Haiku is Unix/Posix-like, so most of the gcc, bash, and other tools from Linux land already exist in Haiku
  • Haiku uses the ELF format, which Go already understands for Linux, BSD.
  • Haiku has a strong user, developer, and hobbyist community.

Some pain points:

  • Go wants syscall information, and the Haiku environment wants that stuff to be used from libbe.so and not called directly, as evidenced here on the Haiku forums, and I removed the link since new users have a two-link maximum.
  • Go has some parts written is assembly, which is difficult anyway.

Are you enticed? What are your thoughts? I’m not a Go or Haiku expert, but I love them both. As for my ability, I have ported Ghidra to Haiku (those links also removed since I have a two-link maximum), and it seems to work well. No idea if anyone actually uses it though.

It would be amazing if, once we’re successful, we could convince the Go developers to continue supporting Haiku :slight_smile:

Links for: Ghidra to Haiku.

Link for Haiku community discussing Go for Haiku: https://discuss.haiku-os.org/t/haiku-api-bindings-for-other-languages/7849/46