File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " objc_sys"
3
- version = " 0.0.0"
3
+ version = " 0.0.0" # Remember to update html_root_url in lib.rs
4
4
authors = [
" Mads Marquart <[email protected] >" ]
5
5
edition = " 2018"
6
6
@@ -13,3 +13,14 @@ categories = [
13
13
repository = " https://github.com/madsmtm/objc"
14
14
documentation = " https://docs.rs/objc_sys/"
15
15
license = " MIT"
16
+
17
+ exclude = [
18
+ # Used to help developers track changes by running bindgen against
19
+ # different revisions of Apple's open source `objc4`.
20
+ " helper-scripts/*" ,
21
+ ]
22
+
23
+ # Downstream users can customize the linking to libobjc!
24
+ # See https://doc.rust-lang.org/cargo/reference/build-scripts.html#overriding-build-scripts
25
+ links = " objc"
26
+ build = " build.rs"
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ println ! ( "cargo:rerun-if-changed=build.rs" ) ;
3
+ println ! ( "cargo:rustc-link-lib=dylib=objc" ) ;
4
+
5
+ // TODO: Should we vendor GNUStep's libobjc2 on non-apple targets?
6
+ // Check std::env::env::var("CARGO_CFG_TARGET_VENDOR").unwrap()
7
+ // Cargo.toml:
8
+ // [target.'cfg(not(target_vendor = "apple"))'.build-dependencies]
9
+ // cc = "1.0"
10
+ }
Original file line number Diff line number Diff line change 5
5
//! Protocol / objc_protocol is no longer a type alias of objc_object, for
6
6
//! better type safety. Their internal representation is the same, so the
7
7
//! functionality is just a cast away.
8
+ //!
9
+ //! Deprecated functions are not included since they could be removed at any
10
+ //! macOS release, and then our code would break.
8
11
9
12
// TODO: Replace `extern "C"` with `extern "C-unwind"`.
10
13
11
14
#![ no_std]
12
15
#![ allow( non_camel_case_types) ]
13
16
#![ allow( non_upper_case_globals) ]
14
- // Update in Cargo.toml as well.
15
- #![ doc( html_root_url = "https://docs.rs/objc_sys/1.1.0" ) ]
17
+ #![ doc( html_root_url = "https://docs.rs/objc_sys/0.0.0" ) ]
16
18
19
+ // TODO: Remove this and add "no-std" category to Cargo.toml
17
20
extern crate std;
18
21
19
22
use core:: cell:: UnsafeCell ;
@@ -52,6 +55,3 @@ pub use various::*;
52
55
///
53
56
/// TODO: Replace this with `extern type` to also mark it as unsized.
54
57
type OpaqueData = PhantomData < ( UnsafeCell < * const ( ) > , PhantomPinned ) > ;
55
-
56
- #[ link( name = "objc" , kind = "dylib" ) ]
57
- extern "C" { }
You can’t perform that action at this time.
0 commit comments