Drew's fast Rust AppKit bindings

Overview

Drew's fast Rust AppKit bindings

Provides select Rust bindings for Apple AppKit framework. This may be compared to,

Part of the objr expanded universe, distinctive features of this library:

  • As part of the objr ecosystem, classes such as NSView can be subclassed directly in Rust.
  • Fast. This crate is significantly faster than other approaches. If you are interested in writing performance-critical realtime applications, this is the solution for you.
    • The full set of optimization is far too many to list, but the big idea is to either do what native ObjC/Swift applications do, or do something faster.
    • Compile-time selectors. Most Rust crates do a runtime lookup for ObjC methods, which involves acquiring a lock and other yucky stuff, either on the first call or every call. Instead, we do what real ObjC compilers do, which is way faster. For more details, see objr
    • Smart pointers that provide global ARC inference. Like ARC, you don't need to write manual retain/release calls. Unlike ARC, the compiler usually doesn't need to write them either, meaning lower runtime memory management cost than even native code. For more details, see objr.
    • Runtime autorelease eliding, which keeps your objects out of autoreleasepools in common cases. For more details, see objr.
    • Pointer packing for optional types so they fit in a u64. For more details, see objr
  • Safe APIs. Where possible APIs are designed with safe abstractions to provide familiar guarantees to Rust developers
  • Low-level. These bindings assume familiarity with bound APIs and are not documented separately. For details on how they work, see the native documentation.
  • Free for noncommercial or "small commercial" use.

Implementation status

The following APIs are at least partially implemented. These implementations are incomplete but contain common functions or "the ones I use".

The objr macro system makes it very ergonomic to add new bindings for specific missing features or new APIs.

  • NSView - several common APIs. In particular, subclassing of this type is fairly well tested in my other projects.
  • NSWindow and related types - several common APIs.
  • NSApplication - a few APIs
  • NSScreen - a few APIs
  • NSGraphics, NSBackingStoreType, NSDeviceDescriptionKey - few APIs
You might also like...
Rust bindings for the FLTK GUI library.
Rust bindings for the FLTK GUI library.

fltk-rs Rust bindings for the FLTK Graphical User Interface library. The fltk crate is a cross-platform lightweight gui library which can be staticall

The bindings to the Nuklear 2D immediate GUI library.

nuklear-rust The bindings to the Nuklear 2D immediate GUI library. Currently beta. Drawing backends: gfx-pre-ll for GFX 3D drawing engine (examples: O

Egui bindings for macroquad

egui bindings for macroquad This is the easiest way to use egui. Just two functions! Web demo. Usage You need to call ui when you need to get informat

Egui bindings for miniquad

egui bindings for miniquad native On Linux you first must run apt install libx11-dev libxi-dev libgl1-mesa-dev (miniquad dependencies). cargo run --re

Unsafe bindings and a safe wrapper for gtk4-layer-shell, automatically generated from a .gir file

gtk4-layer-shell: gtk4-layer-shell-sys: gtk4-layer-shell This is the safe wrapper for gtk4-layer-shell, automatically generated from its .gir file. Fo

A fast, zbus-based, permissively licensed AT-SPI library written in pure Rust!

AT-SPI for Rust Higher level, asynchronous Rust bindings to AT-SPI2, using zbus. Part of the Odilia screen reader project. Design Fully documented, wi

Szyszka is a simple but powerful and fast bulk file renamer.
Szyszka is a simple but powerful and fast bulk file renamer.

Szyszka is a simple but powerful and fast bulk file renamer. Features Written in Rust Available for Linux, Mac and Windows Simple GUI created

⚡ A blazing fast alternative to the default Windows delete.
⚡ A blazing fast alternative to the default Windows delete.

Turbo Delete A blazing fast alternative to the default Windows delete. Turbodelete is a blazing fast alternative to the default Windows delete functio

♾️ Fast & Simple AppImage manager
♾️ Fast & Simple AppImage manager

⚠️ Heavily in development (Not working) Leap Fast & Simple AppImage manager What's working Installation (github only, info about app not stored yet) R

Owner
Drew Crawford
Swift, iOS, C, Rust
Drew Crawford
Rust bindings for the FLTK GUI library.

fltk-rs Rust bindings for the FLTK Graphical User Interface library. The FLTK crate is a crossplatform lightweight gui library which can be statically

Mohammed Alyousef 1.1k Jan 9, 2023
Rust bindings for Dear ImGui

imgui-rs: Rust bindings for Dear ImGui (Recently under new maintenance, things subject to change) Window::new(im_str!("Hello world")) .size([300.0

null 2k Jan 7, 2023
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`

Improved User Interface A cross-platform UI toolkit for Rust based on libui iui: ui-sys: iui is a simple (about 4 kLOC of Rust), small (about 800kb, i

Rust Native UI Group 865 Dec 27, 2022
QML (Qt Quick) bindings for Rust language

QML-rust - bindings for Qt Quick Bindings are based on DOtherSide C bindings for QML Library is mostly feature-compliant with other bindings based on

Oak 204 Dec 8, 2022
Rust bindings for Sciter

Rust bindings for Sciter Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust). Introduction Sciter is an embeddable mu

Terra Informatica Software, Inc 757 Dec 30, 2022
Provides Rust bindings for GTK libraries

The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries

null 431 Dec 30, 2022
Provides Rust bindings for Gnome libraries

gtk-rs-core The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries. You can find more about it on https://gtk-rs.org.

null 174 Dec 26, 2022
Rust bindings for Dear ImGui

imgui-rs: Rust bindings for Dear ImGui (Recently under new maintenance, things subject to change) ui.window("Hello world") .size([300.0, 100.0], C

null 2k Jan 7, 2023
Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo.

THIS REPOSITORY IS DEPRECATED SEE: https://github.com/rust-gnome rgtk Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo. Building rgtk expe

Jeremy Letang 124 Jul 10, 2022
Provides Rust bindings for GTK libraries

gtk3-rs The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries. You can find more about it on https://gtk-rs.org. This

null 431 Dec 30, 2022