Building Rust programs with Goa on SculptOS

With my limited understanding of Goa and Genode in general, this is simply a hypothetical question to set my expectations for the future.

On Linux and BSD I use Rust’s cargo build tool to build and install many useful software packages. Some of which would make life much easier in SculptOS (a CLI or TUI email client for example).

So I’d just like to know what the scope of this development is. Is the intention to make most (if not all) rust crates build and install on Genode using Goa?

1 Like

It appears to have a high priority and to be coming along nicely. Genodians - the official developer’s blog - has a number of articles exploring the status of Rust support.

1 Like

Sorry for the late reply, your post came up right at the beginning of my vacation.
Short answer: it would be nice to make most Rust crates work, but at Genode Labs we won’t offer comprehensive Rust support (as in “most (if not all)” rust crates) anytime soon, unless there is commercial interest in the necessary enhancements.

Long answer:
In theory, you can already build all kinds of crates using Goa. However, Genode’s Rust support uses Rust’s FreeBSD target. Our port of FreeBSD’s C library doesn’t aim to be a complete and faithful emulation of FreeBSD, so depending on the software you are trying to port, it may fail to link because of an unimplemented C library function, or it may fail to work correctly if it relies on FreeBSD features that Genode doesn’t have full support for (e.g. C library calls that always return an error on Genode because the underlying system call might not be applicable in our POSIX runtime).

What’s more, as you probably know a lot of Rust crates depend 3rd party (C/C++) libraries, which may or may not have Genode ports readily available. This is not necessarily a huge problem, for example our ripgrep port works just fine without libpcre2 as an optional dependency, but on the flip side, having Rust support of course doesn’t relieve us from porting required library dependencies as well.

This being said, I’m excited to see Rust support on Genode grow and I hope we will be able to greatly expand our support for Rust crates in the future.

1 Like