This library binds (some subset of) Apple Foundation to Rust. It may be compared to objc-foundation and cocoa-foundation.
Part of the objr expanded universe, distinctive features of foundationr:
- Zero-cost abstractions. Calling this library should perform identically to calling Foundation from Swift/ObjC applications.
- Fast enumeration. This avoids the need to use the ObjC runtime to do something like enumerate many objects.
- Safe APIs. Where possible APIs are designed with safe abstractions to provide familiar guarantees to Rust developers
- Low-level. These bindings assume familiarity with Foundation APIs and are not documented separately.
- Modular. Foundation is a big library; individual features are gated with feature flags
- Free for noncommercial or "small commercial" use.
The scope of this project is to implement "all of foundation", however, in practice, I mostly have time to implement APIs I actually use in other projects.
The following cargo features are currently supported, and provide at least some APIs on each type:
nsstring
nsdata
nsdictionary
nsvalue
nsrange
nsdate
nsnenumerator
nsarray
nsattributedstring
nscopying
nsthread
nsnotification
nsrunloop
nsurl
nsurlresponse
nsurlrequest
nsurlsession
all
- enables all other features