Replace C++ code with Rust

The point was if you were using CEF… which most applications that embed webkit now use… you could use either.

Cef is part of blink, not webkit. We picked webkit precisely because it allows native porting (drawing is done by app_server)

2 Likes

Yeah you’re right about that, I didn’t noticed that it no longer used webkit in CEF 3…

That said as Haiku’s rust port progresses perhaps Firefox will just start working, with a little prodding of course, as they are implementing a lot of the new stuff in rust in a more portable manner. For instance they have accelerated Firefox running experimentally on top of gfx-rs on Linux now. https://github.com/szeged/webrender/issues/198

Swift is open source, you can try porting it ))

Whoa, where is Swift in Depot ?

Or… someone who knows what they’re doing could do it, and it would be much better. Probably even usable. And there was someone working on it at one time.

Run HaikuDepot and search for swift. It’ll show up as swift_lang, I think. It also may only be 64-bit.

Do not forget, you don’t need to be a programmer to help at porting softwares, compilers, etc. The developers have already enough task, do not wait to them, go, grab the sources and explore it, what happens if you try to follow the official compilation instructions. You can collect informations like: needed dependencies, configuration problems, linuxism (using linux paths or functionality, etc), you can even consult with the original authors to get more info. You can create an issue with this info at the haikuports issues page, so the developers could have a basic overview what would be needed, and if they want to do something different, maybe they will try their teeth on your dream-software.

So do what you can.

In plenty cases following the official install instructions can be enough to get it work! Ofc, the bigger the task is, the less the chance to get it work without patching, but you would never know if you don’t try it.

3 Likes

This topic is awesome.

For what it’s worth, I did write our ARM image writer in Rust… and it is even in our official repos now. Can we consider this one done? :slight_smile:

5 Likes

they’re working on a rust version of vulkan 3D for MAC & Linux:

Apparently not…

I am a little late to the party here, having not really been involved with Haiku in a while. The Beta release has reinvigorated my interest quite a bit.

Anyhow, I personally like Rust a lot. I have never been a serious C++ person, mostly just enough to get by developing a few things in Haiku, but I have been out of that since my son was born, who is almost 5.

I think Rust improves upon some of the warts in C and C++ quite a bit. I have not kept up with modern C++ but my understanding is that it adds a lot of the nice things Rust has. But there is still null, use after free, and all those standard issues that have plagued C/C++ since they were created.

With that said, I agree it is a joke to rewrite Haiku in Rust. But I do think Rust could have a place in Haiku, and I would like to see it become a first class language.

I have entertained the idea of a new composting app_server in Rust, which is not all that crazy because the app_server is primarily accessed by applications through its messaging interface, which I am sure could be supported in Rust. Reading this thread though, I don’t know if other developers in the Haiku project would accept such a thing.

But making a Rust InterfaceKit might be interesting and would open up another fast language for developing applications for Haiku. It could serve as a test bed for some API changes which could be incorporated into an R2 C++ InterfaceKit.

To conclude, I am interested in Rust on Haiku, and when I get my Haiku dev machine set up again I will look into updating our Rust port and seeing if we can make it more official with the Rust project.

10 Likes

I present to you https://github.com/eliotfowler/aluminum

1 Like

There is also the Redox project that is purely written in Rust.