• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

ci/H03-May-2022-242176

examples/H03-May-2022-137115

src/H03-May-2022-1,9131,614

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

.gitignoreH A D02-Feb-201820 32

.travis.ymlH A D31-May-20198.2 KiB261251

Cargo.tomlH A D01-Jan-19701.6 KiB4740

Cargo.toml.orig-cargoH A D01-Jun-20191.1 KiB3530

LICENSE.mdH A D02-Feb-20181.3 KiB2419

README.mdH A D01-Jun-20192.3 KiB5641

README.md

1[![Build Status][travis_ci_badge]][travis_ci] [![Latest Version]][crates.io] [![docs]][docs.rs]
2
3A Rust interface to the **user-space** API of the Mach 3.0 kernel exposed in
4`/usr/include/mach` that underlies macOS and is linked via `libSystem` (and
5`libsystem_kernel`).
6
7This library does not expose the **kernel-space** API of the Mach 3.0 kernel
8exposed in
9`SDK/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach`.
10
11That is, if you are writing a kernel-resident device drivers or some other
12kernel extensions you have to use something else. The user-space kernel API is
13often API-incompatible with the kernel space one, and even in the cases where
14they match, they are sometimes ABI incompatible such that using this library
15would have **undefined behavior**.
16
17# Usage
18
19Add the following to your `Cargo.toml` to conditionally include mach on those
20platforms that support it.
21
22```toml
23[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.mach]
24version = "0.3"
25```
26
27The following crate features are available:
28
29* **deprecated** (disabled by default): exposes deprecated APIs that have been
30  removed from the latest versions of the MacOS SDKs. The behavior of using
31  these APIs on MacOS versions that do not support them is undefined (hopefully
32  a linker error).
33
34# Platform support
35
36The following table describes the current CI set-up:
37
38| Target                | Min. Rust | XCode         | build | ctest | run |
39|-----------------------|-----------|---------------|-------|-------|-----|
40| `x86_64-apple-darwin` | 1.33.0    | 6.4 - 10.0    | ✓     | ✓     | ✓   |
41| `i686-apple-darwin`   | 1.33.0    | 6.4 - 10.0    | ✓     | ✓     | ✓   |
42| `i386-apple-ios`      | 1.33.0    | 6.4 - 9.4 [0] | ✓     | -     | -   |
43| `x86_64-apple-ios`    | 1.33.0    | 6.4 - 10.0    | ✓     | -     | -   |
44| `armv7-apple-ios`     | nightly   | 6.4 - 10.0    | ✓     | -     | -   |
45| `aarch64-apple-ios`   | nightly   | 6.4 - 10.0    | ✓     | -     | -   |
46
47[0] `i386-apple-ios` is deprecated in XCode 10.0.
48
49[travis_ci]: https://travis-ci.org/fitzgen/mach
50[travis_ci_badge]: https://travis-ci.org/fitzgen/mach.png?branch=master
51[crates.io]: https://crates.io/crates/mach
52[Latest Version]: https://img.shields.io/crates/v/mach.svg
53[docs]: https://docs.rs/mach/badge.svg
54[docs.rs]: https://docs.rs/mach/
55
56