
The State of Rust on Haiku - squiguy7
https://www.haiku-os.org/blog/nielx/2018-07-05_the_state_of_rust_on_haiku/
======
adamnemecek
I wonder if Haiku could become the foundation for a new os. Haiku but based on
Rust. It would be a match made in heaven, Haiku's secret sauce is the
asyncness of the API. This was doable in C++ however Rust and haiku are a
wombo combo!

~~~
drb91
You’re basically describing Fuschia. I believe they have some of the main
haiku kernel (probably a bad description) developers.

~~~
captainmuon
From the technical side, maybe. From the user side they could not be more
different. BeOS was the ultimate power user OS. You had a lot of power, but
also responsibility. It included many features like the novel filesystem that
more pragmatic OSes didn't include.

Fuchsia, as far as I can see, is the ultimate "modern" OS. While very safe, it
will be very locked down, in the tradition of iOS, Android, Secure Boot,
HTML5+js etc. but "done right". There will probably be a lot of things I won't
be able to do with a Fuchsia phone.

~~~
Apocryphon
HTML5+js is very locked down?

~~~
nerdponx
Maybe in the sense that webpages cannot talk to each other directly.

~~~
gameswithgo
or the hardware

------
e12e
> Rustc memory usage on Linux is also high, but it never runs out of memory. I
> would like to figure out the cause of this issue.

Strange. I hope this isn't simply a case of wildly over-committing memory and
getting away with it on Linux. But then I guess the bsd folks would have is
yes too?

~~~
civilitty
I believe it is a result of changes described here (the post is about thinLTO
but it explains parallel codegen after the TOML config example):
[https://internals.rust-lang.org/t/help-test-out-
thinlto/6017](https://internals.rust-lang.org/t/help-test-out-thinlto/6017)

In order to parallelize the build process at the rustc-llvm codegen boundary,
Cargo has to implement some orchestration between compiler processes (using
jobserver-rs [1]) so that 10 rustc processes didn't all create 10 threads and
codegen units each and blow up the system. I'm guessing that memory quotas are
a part of that implementation.

[1]
[https://crates.io/crates/jobserver/reverse_dependencies](https://crates.io/crates/jobserver/reverse_dependencies)

------
mastrsushi
The state of (Anything) on Haiku.

------
dorfsmay
For others who like me have a hard time keeping track of which OS is what...

"Haiku is an open-source operating system that specifically targets personal
computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn
and yet very powerful."

From: [https://www.haiku-os.org/](https://www.haiku-os.org/)

~~~
giancarlostoro
Wikipedia gives a nice overview too:

[https://en.wikipedia.org/wiki/Haiku_(operating_system)](https://en.wikipedia.org/wiki/Haiku_\(operating_system\))

~~~
slantyyz
Serious question - does anyone use Haiku for anything more than playing?

I was a huge BeOS fan back in the day, and bought the Intel version when I had
a Pentium ][ computer. I was so excited for OpenBeOS (now Haiku) after BeOS
got acquired, but it's been something 17 years, and it looks they're still
just a release candidate for 1.0.

Back then, BeOS did some amazing stuff compared to Windows, but technology has
come a long way since then, and I'd rather be using MacOS, Windows or a Linux
Desktop like Ubuntu than Haiku.

~~~
kitsunesoba
Right now they’re focused mostly on parity with BeOS R5 in terms of
features/capabilities. Once that goal has been reached, the focus will shift
to making Haiku a proper modern OS and addition of new features in the spirit
of BeOS. I suspect that it’ll become much more interesting to a wider variety
of people after a release or two with the latter focus.

The one thing that makes Haiku intriguing and promising in my eyes is the fact
that its developers want it to be a first class desktop/laptop OS above all
else with no server/mobile/other kitchen-sink-isms muddying the water. There’s
nothing like that out there today, save for maybe macOS (which is more desktop
focused but still suffers from the various multipurpose compromises brought
from its *NIX heritage).

~~~
michaelmrose
"no server/mobile/other kitchen-sink-isms muddying the water"

I'm not convinced that at present this is a meaningful benefit especially
compared to the increased resources available for say linux. The one good
example that I can think of cpu schedulers seems to be solved by running a
kernel with alternative patches.

~~~
kitsunesoba
The benefit would be the ability to cherry pick only the most desktop-
beneficial features rooted in non-desktop domains while also leaving behind
the rest. One example would be the window server and compositor — on
Linux/BSD, these services, being desktop oriented on a multipurpose system,
must be wholly decoupled from the rest of the system introducing a ton of
opportunities for latency, stutter, and other issues to find their way into
the user experience. It’s not impossible to minimize these issues, but it’s
much more difficult.

Haiku doesn’t have to worry about this problem at all. It can simply implement
the most effective and good-experience-conducive end to end design possible
for its window management and compositing since it’ll never ever be a headless
server.

~~~
mikepurvis
But doesn't that mandatory separation of concerns lead to good system
architecture?

Microsoft lived without it for years and then finally did the job when they
needed a Core OS to be shared between laptops, servers, phones, and Xbox— in
the process they discovered and cleaned up all kinds of super weird
interdependencies between components which should definitely not needed to be
talking to each other.

~~~
waddlesplash
Haiku developer here.

I used to run Linux on the desktop pretty extensively, but eventually got fed
up with how often something broke and I had to fix it (ALSA doesn't play audio
anymore, or suddenly MP4 files stutter -- or most recently, on the last
remaining Kubuntu install, I can't even log in to my user account after the
upgrade, it just hangs.) So, perhaps the system is "better architected" by
some standard, but having those weird inter-dependencies tends to mean
everything runs smoother. Depends on what your definition of "good" is, I
guess.

~~~
michaelmrose
Kubuntu is perhaps not the finest example as it has not been what I would call
stable or optimal. I honestly think your analysis is in error. It has forever
been the wort kde distro you could pick. You could get a more stable
experience by picking a distro by throwing darts at printout of distrowatch.

A number of things have been historically sub optimal on the linux desktop but
while the way linux is designed as a bunch of loosely coupled projects DOES
seem to be the cause of it being able to be a lot of different things to a lot
of different people example different window managers, compositors, file
systems its not equally clear that the defects present exist for the same
reason.

It seems likely that haiku expanded to thousands of different types of
computers could easily be worse or better than linux in practice insofar as
buggy behavior while still definitely being objectively worse insofar as not
being modular.

~~~
AnIdiotOnTheNet
Another part of the problem with the Linux desktop is that if you have
problems with it someone blames your choice of distro and sends you to one of
the other 250 so you can encounter whole new problems and have a whole new
community dismiss you until someone else blames your choice of distro.

~~~
michaelmrose
The way you write this makes it seem like its 6 of one half a dozen of
another. While everyone has a different favorite team some really do play
objectively better than others.

There are probably over a hundred distros but most users are using some
variation of 4 and those who want to use their computer not play with their
computer ought to look into using a stable branch of whichever distro suits
them.

------
neduma
Some reasons i was thinking Rust in Heroku. Need coffee!!

------
abhiminator
This is exciting -- Rust has already shown great results through its
implementation in Firefox (made me dump Chrome for Quantum)[0], so building a
whole new operating system using the language makes perfect sense -- a great
test bed for the language, imo.

And given the fact that Haiku OS team's goal is to build a 'unified' and well-
fused OS for personal use [1], using a single language should greatly help
with reducing complexity and improving robustness.

[0] [https://hacks.mozilla.org/2017/11/entering-the-quantum-
era-h...](https://hacks.mozilla.org/2017/11/entering-the-quantum-era-how-
firefox-got-fast-again-and-where-its-going-to-get-faster/) [1]
[https://www.haiku-os.org/about/faq#what-is-haiku](https://www.haiku-
os.org/about/faq#what-is-haiku)

~~~
AnIdiotOnTheNet
Haiku is written in C++, as are most of its utilities I imagine. I don't see
them redoing all that effort for such trivial gain. They're just talking about
tooling and language bindings for people developing applications for Haiku.

You might be thinking of RedoxOS [0]?

[0] [https://www.redox-os.org/](https://www.redox-os.org/)

