Skip to content

Idiomatic Rust bindings for iOS and macOS system libraries and frameworks.

License

Notifications You must be signed in to change notification settings

briantkelley/apple-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apple-rs

Idiomatic Rust bindings for iOS and macOS system libraries and frameworks.

This repository aims to provide zero-overhead idiomatic bindings to iOS and macOS APIs, including (eventually) Objective-C and Swift interfaces. See the experimental/objective-c-bindings branch for a potential approach for implementing Rust bindings to Objective-C interfaces.

Crates

This repository contains multiple crates to simplify development. The bindings here are implemented "on demand" which may necessarily require changes in multiple crates to implement the full dependency graph.

Idiomatic Rust Bindings:

  • corefoundation Core Foundation is a framework that provides fundamental software services useful to application services, application environments, and to applications themselves. Core Foundation also provides abstractions for common data types, facilitates internationalization with Unicode string storage, and offers a suite of utilities such as plug-in support, XML property lists, URL resource access, and preferences.
  • dispatch: Execute code concurrently on multicore hardware by submitting work to dispatch queues managed by the system.
  • icu: Source-compatible, drop in replacement for various unicode-rs crates for the purpose of reducing binary size by relying on system-provided Unicode databases.
  • retain-release: Support for building idiomatic Rust bindings for foreign heap-allocated, reference-counted objects. Used by corefoundation.

Raw Rust Bindings:

  • corefoundation-sys: Raw Rust bindings to Apple's CoreFoundation Clang module (located at $SDKROOT/System/Library/Frameworks/CoreFoundation.framework/Modules/module.modulemap).
  • dispatch-sys: Raw Rust bindings to Apple's Dispatch Clang module (located at $SDKROOT/usr/include/dispatch/module.modulemap).
  • icu-sys: Raw Rust bindings to Apple's ICU Clang module (located at $SDKROOT/usr/include/unicode/module.modulemap, or in the Apple OSS Distributions ICU GitHub project).

Experimental Rust Bindings:

  • darwin: Bindings to Apple's Darwin Clang module (located at $SDKROOT/usr/include/module.modulemap).
  • os: Bindings to Apple's OS Clang module (located at $SDKROOT/usr/include/module.modulemap).

Some crates have an experimental feature that disables, by default, functions, modules, traits, types, etc. that are still under active development and subject to change.

Open Issues

Although the major version number of the crates in this repository is 0, the public interfaces are expected to remain stable (i.e. source compatible) as additional functionality is added. Unstable interfaces require use of the experimental feature.

Before crates can be published with a major version of 1, the active issues in the 1.0.0 milestone need to be resolved.

About

Idiomatic Rust bindings for iOS and macOS system libraries and frameworks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages