Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust is still new and shiny, and is still evolving at a rapid pace. Everyone's still learning Rust, I'd imagine that even Rust core contributors are still learning Rust! (The same can be said for most other languages too, although not all to the same extent). Anyone who is looking for Rust talent right now, and who discards the CVs of people "still learning", clearly knows nothing about Rust, nor about hiring good devs.


1.0 was released 5 years ago.

Swift is younger and I think it’s a great language.

If the tooling is ready and I don’t have to fight it, I’d be fine using Rust. I just need a reason. Anyone using it for iOS development?


I've actually got a working set of bindings to AppKit/UIKit that I'm trying to get to a release-able point. They run fine on both macOS and iOS; for the former I've also got decent support for sandboxed environments.

My goal is to write all my stuff in Rust, because I am sick and tired of writing products for the Apple ecosystem and then having to rewrite them if I want them outside of it.

I don't enjoy writing browser-wrapped applications (though they have their place, let me be clear...). I don't want to write in C just to be able to compile anywhere. IMO, Rust is the future.

/end fanboy-ism I suppose


If you can share, how usable is your approach boilerplate/types wise? Would love to go all into Rust but the AppKit/etc. bindings get clunky very easily.


I've actually settled on an approach that feels just like writing Cocoa/AppKit/UIKit. It effectively exposes wrapper types that loop in delegates, so you wind up with a feeling like you're writing classes - you just can't subclass. I've tried to keep the conventions (entry points, lifecycles, method naming) very similar so knowledge transfer is there.

I have a repo for it but the example is pretty out of date. Can see about updating it when I've got the next push ready.


Will keep an eye out on your GitHub, just saw the repo you already have there. This is a heroic effort!


If you're interested, you can kinda see what I've been trending towards here: https://twitter.com/ryanmcgrath/status/1238285152771440640

The goal is to feel very, very familiar to anyone who's done Cocoa work before. :)


My employer, Cloudflare, is using Rust as part of the 1.1.1.1 app on iOS.


Is this code shared across platforms?


Yes, it's also used on Android, mobile-wise, and tons of desktop platforms: https://github.com/cloudflare/boringtun#supported-platforms


I love Rust, but it doesn't have a strong UI development story yet.


very few languages do, and those that do it is usually for just one platform.


Because native UI is on the decline unfortunately. Its too complicated and there are too many different systems. If you want a gui in rust you would be better off having your program start a web server on localhost.


Because most UI toolkits are strongly object oriented and Rust isn't an object oriented language.


FullStory is - we have a shared core codebase in Rust, and then some OS-specific code for Android and iOS.

We're using a custom Rust toolchain so that we can support bitcode on iOS, but if you don't need that feature, then stable Rust works fine.


It's very easy to cross-compile and use Rust as a library, leaving the Swift portion for display/views only. We are looking at doing this for our next app (OS X, but would work just as fine for iOS).


That long? I remember the launch parties...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: