mirror of
https://github.com/storytold/craft-libs.git
synced 2026-12-01 02:36:54 +01:00
core-graphics2 0.6.1, its latest release, depends on block 0.1.6, which the compiler reports as code that a future version of Rust will reject. The `screen` feature now takes Core Graphics from objc2-core-graphics 0.3, the objc2 family craft-platform already uses, and block and core-graphics2 leave Cargo.lock. The two calls that need `unsafe` (the active display list and an image's pixel bytes) are in a new craft-appkit module, `display`, with tests. The capture makes the same Core Graphics calls and checks as before.
39 lines
2.1 KiB
TOML
39 lines
2.1 KiB
TOML
[package]
|
|
name = "craft-appkit"
|
|
description = "The macOS menu-tracking observers, Save panel calls and Core Graphics display calls that need `unsafe`, behind a safe API, so no other crate allows `unsafe`."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
# `NSMenuDidBeginTrackingNotification` and `NSMenuDidEndTrackingNotification`, observed through
|
|
# `NSNotificationCenter` with a block. A Save panel made with `-init`, and the target of a pop-up menu's action.
|
|
# The active display list and an image's pixel bytes from Core Graphics.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
block2 = "0.6.2"
|
|
objc2 = { version = "0.6.4", default-features = false, features = ["std"] }
|
|
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSButton", "NSControl", "NSMenu", "NSPanel", "NSPopUpButton", "NSResponder", "NSSavePanel", "NSView", "NSWindow"] }
|
|
objc2-core-graphics = { version = "0.3.2", default-features = false, features = ["std", "CGDataProvider", "CGDirectDisplay", "CGError", "CGImage"] }
|
|
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "block2", "NSNotification", "NSObject", "NSOperation", "NSString"] }
|
|
|
|
# A test image made from known bytes.
|
|
[target.'cfg(target_os = "macos")'.dev-dependencies]
|
|
objc2-core-foundation = { version = "0.3.2", default-features = false, features = ["std", "CFData"] }
|
|
objc2-core-graphics = { version = "0.3.2", default-features = false, features = ["std", "CGColorSpace", "CGDataProvider", "CGImage"] }
|
|
|
|
# The workspace table with `unsafe_code` at `deny`: `lib.rs` allows it for this crate's FFI calls, and design-lint's
|
|
# `contract/unsafe-allow` rule names this crate's source as one of the places that may. Cargo cannot override one
|
|
# workspace lint.
|
|
[lints.rust]
|
|
unsafe_code = "deny"
|
|
missing_docs = "warn"
|
|
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(craft_pdf_unicode_fixtures)"] }
|
|
|
|
[lints.clippy]
|
|
cognitive_complexity = "deny"
|
|
too_many_arguments = "deny"
|
|
wildcard_imports = "deny"
|
|
dbg_macro = "warn"
|
|
todo = "warn"
|