News for hackers. Stuff that matters.
Re:Rust in the Android Platform by username_my1 on Tuesday April 06, 2021 @04:31PM (#26717027)
I think you can do 60fps on android with kotlin easily ... in fact you can do that with RN (if you're careful).

Rust is not a UI programming language and shouldn't be.

but writing your own native modules in rust might be fun (VR, Audio processing, AI ...)

Re:Rust in the Android Platform by carlhjerpe on Tuesday April 06, 2021 @10:57PM (#26720107)
What prevents Rust(as a language) from being used to write UI? Qt is implemented in C++, which rust seems to aim to replace.

Rust seems like an excellent contender for the future.

Re:Rust in the Android Platform by pjmlp on Wednesday April 07, 2021 @03:33AM (#26721481)
The borrow checker.

UIs tend to have designs that require graph based structures and self referencial references, so in the end you get either lots of Rc<RefCell<>> and clone() calls, or have to bind the whole stack to fit into Rust's memory model.

Have a look at,

https://raphlinus.github.io/rust/druid/2019/10/31/rust-2020....

https://raphlinus.github.io/rust/druid/2020/09/28/rust-2021....

Re:Rust in the Android Platform by steveklabnik on Wednesday April 07, 2021 @12:40AM (#26720668)
Many UI toolkits use shared ownership and callbacks, and that's annoying in Rust. Some bindings make it work. There's a bunch of folks working on interesting architectures. But the classic styles just clash with Rust's default way of doing things.
Re:Rust in the Android Platform by throwaway189262 on Wednesday April 07, 2021 @12:06AM (#26720488)
Multi threading sanely requires Arc, and reference counting is a crappy form of GC.

If you have enough threads passing stuff around and can deal with the ~50% performance loss between Java and Rust, it's much easier to use a language with GC.

There's talk of adding a quality GC to rust and dedicated GC types. If/when that happens, Rust will be a contender for a bunch of higher level systems