You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add to CI.
- Update to 2021 edition.
- Support visionOS and watchOS.
- Align Cargo.toml metadata with the rest of the project.
- Fix typos.
- Appease Clippy.
- Prefer `Box::into_raw` over `Box::leak`.
- Consolidate documentation.
Part of #77.
@@ -163,6 +167,7 @@ This project also draws inspiration from:
163
167
-[`uikit-sys`](https://github.com/simlay/uikit-sys) and `@simlay`'s [Objective-C work on `bindgen`](https://rust-lang.github.io/rust-bindgen/objc.html)
Finally, this is by far not the only project that ever tried to interoperate with Objective-C; other languages have done so as well (to varying degrees of success):
168
173
- Swift: Built from the beginning for Objective-C interop, and is what `objc2` aspires to have feature-parity with (though will probably never reach). Truly beautifully designed language!
Copy file name to clipboardexpand all lines: crates/dispatch2/TODO.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
- CI test on Windows using https://github.com/apple/swift-corelibs-libdispatch
7
7
- Safe wrapper for ``dispatch_source_*`` + ``set_target_queue/activate/suspend/resume`` for it
8
8
- Safe wrapper for ``dispatch_data_*``
9
-
- Safe wrapper for ``dispatch_once_f`` (is that relevent?)
9
+
- Safe wrapper for ``dispatch_once_f`` (is that relevant?)
10
10
- Safe wrapper for ``dispatch_get_context/dispatch_set_context`` (quite impossible without big overhead => wrap dispatch object destructor to release the boxed value)
11
11
- All blocks related bindings and ``dispatch_block_*`` functions with compat with ``block2`` on Apple platforms.
12
12
- Integrate conversion from SystemTime to dispatch_time_t via dispatch_walltime and safe APIs using that.
Copy file name to clipboardexpand all lines: crates/dispatch2/src/lib.rs
+11-15
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,22 @@
1
-
#![allow(unused_unsafe, unreachable_patterns)]
2
-
#![deny(
3
-
missing_docs,
4
-
clippy::undocumented_unsafe_blocks,
5
-
clippy::missing_safety_doc
6
-
)]
7
-
8
-
//!
9
-
//! Apple Dispatch (Grand Central Dispatch)
1
+
//! # Apple's Dispatch (Grand Central Dispatch)
10
2
//!
11
3
//! This crate allows interaction with the [Apple Dispatch](https://developer.apple.com/documentation/dispatch) library in a safe (``dispatch2`` module) and unsafe (``ffi`` module) way.
12
4
//!
13
-
//! # Example:
5
+
//! ## Example
14
6
//!
15
7
//! ```
16
8
//! use dispatch2::{Queue, QueueAttribute};
17
9
//!
18
-
//! fn main() {
19
-
//! let queue = Queue::new("example_queue", QueueAttribute::Serial);
20
-
//! queue.exec_async(|| println!("Hello"));
21
-
//! queue.exec_sync(|| println!("World"));
22
-
//! }
10
+
//! let queue = Queue::new("example_queue", QueueAttribute::Serial);
0 commit comments