5 releases

Uses old Rust 2015

0.1.4 Nov 12, 2017
0.1.3 Nov 5, 2015
0.1.2 Oct 18, 2015
0.1.1 Aug 19, 2015
0.1.0 Jun 1, 2015

#916 in Algorithms

Download history 5315/week @ 2023-05-26 6716/week @ 2023-06-02 6436/week @ 2023-06-09 5897/week @ 2023-06-16 7554/week @ 2023-06-23 6348/week @ 2023-06-30 7153/week @ 2023-07-07 8986/week @ 2023-07-14 10468/week @ 2023-07-21 10191/week @ 2023-07-28 10804/week @ 2023-08-04 9668/week @ 2023-08-11 10286/week @ 2023-08-18 9979/week @ 2023-08-25 9115/week @ 2023-09-01 8891/week @ 2023-09-08

22,620 downloads per month
Used in 213 crates (6 directly)

MIT license

649 lines

CoreFoundation Rust Bindings

The CoreFoundation-sys package provides declarations and linkage for the CoreFoundation C library on OS X. Following the *-sys package conventions, the CoreFoundation-sys package does not define higher-level abstractions over the native library.


The CoreFoundation-sys crate is a work in progress. It currently exports the most basic types (array, dictionary, string, etc) and functions from CoreFoundation and has been tested only on the x86_64 architecture on OS X.


Add CoreFoundation-sys as a dependency in Cargo.toml:

CoreFoundation-sys = "0.1.4"

Import the CoreFoundation_sys crate and use the functions as they're defined in the native CoreFoundation library provided by Apple.

extern crate CoreFoundation_sys as cf;


You may find that you need some functionality that is missing from CoreFoundation-sys. If that's the case, please open an issue on Github or send a pull request with the added functionality.

If you plan to submit a pull request, please note the structure of the code. There is one file for each header file in the CoreFoundation framework. For example, src/string.rs contains the definitions from CoreFoundation/CFString.h. The definitions in each file are more or less in the same order that they appear in the matching header file. Each file is then re-exported in the crate root, e.g., pub use string::*.



Copyright © 2015 David Cuddeback

Distributed under the MIT License.