How to write your own Mac OS X GUI with Rust?

I am going to write software using Rust:

  • The kernel is written in Rust
  • Mac OS's own graphical interface written in Rust (preferably) or in another language.

What setting allows? Is it possible at all?

PS I have never programmed with either Rust or Cocoa / etc before.

+7
rust macos
source share
1 answer

The GUIs developed in Interface Builder work best if you use bindings, but bindings assume Objective-C. For this reason, I write the GUI part in Objective-C and the key part in Rust.

Both can communicate through the obj-c library ( article about this ), but the languages ​​are completely different, so this is a bit inconvenient.

Rust can easily generate a C-compatible static library that can be linked to an Objective-C program. You can even add a Makefile target to Xcode to create everything without leaving Xcode.

+4
source share

All Articles