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

#110 in macOS and iOS APIs

Download history 6552/week @ 2024-01-03 6182/week @ 2024-01-10 5859/week @ 2024-01-17 5214/week @ 2024-01-24 4843/week @ 2024-01-31 5115/week @ 2024-02-07 4610/week @ 2024-02-14 5115/week @ 2024-02-21 4769/week @ 2024-02-28 5041/week @ 2024-03-06 5108/week @ 2024-03-13 4512/week @ 2024-03-20 4027/week @ 2024-03-27 4192/week @ 2024-04-03 4063/week @ 2024-04-10 3809/week @ 2024-04-17

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

MIT license

42KB
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.

Status

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.

Usage

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

[dependencies]
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;

Contributing

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::*.

Contributors

License

Copyright © 2015 David Cuddeback

Distributed under the MIT License.

Dependencies

~125KB