From d32bc9ea234940f528cf93b62d9c1cbc612255c8 Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 8 Aug 2017 14:30:53 +0100 Subject: [PATCH] 10.7/10.8 compatibility features --- README.md | 6 ++++++ core-foundation-sys/Cargo.toml | 4 ++++ core-foundation/Cargo.toml | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/README.md b/README.md index ce0909a..d36ff53 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # core-foundation-rs [![Build Status](https://travis-ci.org/servo/core-foundation-rs.svg?branch=master)](https://travis-ci.org/servo/core-foundation-rs) + +## Compatibility + +By default it targets macOS 10.7. + +To enable features added in macOS 10.8, set Cargo feature `mac_os_10_8_features`. To have both 10.8 features and 10.7 compatibility, also set `mac_os_10_7_support`. Setting both requires weak linkage, which is is a nighty-only feature as of Rust 1.19. diff --git a/core-foundation-sys/Cargo.toml b/core-foundation-sys/Cargo.toml index f1dd3e3..5a02fc4 100644 --- a/core-foundation-sys/Cargo.toml +++ b/core-foundation-sys/Cargo.toml @@ -10,3 +10,7 @@ build = "build.rs" [dependencies] libc = "0.2" + +[features] +mac_os_10_7_support = [] # backwards compatibility +mac_os_10_8_features = [] # enables new features diff --git a/core-foundation/Cargo.toml b/core-foundation/Cargo.toml index e338b16..0bbf669 100644 --- a/core-foundation/Cargo.toml +++ b/core-foundation/Cargo.toml @@ -13,3 +13,7 @@ version = "0.4.2" [dependencies] libc = "0.2" + +[features] +mac_os_10_7_support = ["core-foundation-sys/mac_os_10_7_support"] # backwards compatibility +mac_os_10_8_features = ["core-foundation-sys/mac_os_10_8_features"] # enables new features