cacao/Cargo.toml
Mads Marquart 094ed59a04
Initial conversion to objc2 (#30)
* Use objc2

* Replace `objc_id`

* Remove sel_impl import

* Fix `add_method` calls

* Fix accessing raw FFI functions

* Fix Encode impl

* Fix message sends arguments that do not implement `Encode`

* Use immutable reference in a few places where now necessary

See https://github.com/madsmtm/objc2/pull/150 for a bit of background

* Add a few Send + Sync bounds where examples require it

This is something we'll need to look into properly

* Use `&'static Class` instead of `*const Class`

Safer and more ergonomic. Also required for `msg_send_id!` macro

* Use msg_send_id! and rc::Id

* Update objc2 to v0.3.0-beta.2

* Replace `BOOL` with `Bool` when declaring delegates

This makes cacao compile on Aarch64 again

* Remove a few impossible to use correctly `into_inner` functions

These consumed `self`, and hence also dropped `Id` variable that was responsible for keeping the returned pointer alive

* Remove a few impossible to use correctly `From` implementations

* Quickly fix UB with using BACKGROUND_COLOR ivar

* Fix double-freeing of windows

* Fix double freeing of strings

* Fix a few remaining double-frees
2023-09-11 09:59:21 -07:00

110 lines
2.8 KiB
TOML

[package]
name = "cacao"
description = "Rust bindings for AppKit (macOS/Airyx/GNUStep, beta) and UIKit (iOS/tvOS, alpha)."
version = "0.4.0-beta2"
edition = "2018"
authors = ["Ryan McGrath <ryan@rymc.io>"]
build = "build.rs"
repository = "https://github.com/ryanmcgrath/cacao"
categories = ["gui", "os::macos-apis", "os::ios-apis"]
keywords = ["gui", "macos", "ios", "appkit", "uikit"]
license = "MIT OR MPL-2.0+"
[badges]
maintenance = { status = "actively-developed" }
[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-apple-darwin"
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
bitmask-enum = "2.2.1"
objc = { version = "=0.3.0-beta.2", package = "objc2" }
block = { version = "=0.2.0-alpha.6", package = "block2" }
# Temporary: Patched versions that implement `Encode` for common types
# Branch: `objc2`
core-foundation = { git = "https://github.com/madsmtm/core-foundation-rs.git", rev = "7d593d016175755e492a92ef89edca68ac3bd5cd" }
core-graphics = { git = "https://github.com/madsmtm/core-foundation-rs.git", rev = "7d593d016175755e492a92ef89edca68ac3bd5cd" }
dispatch = "0.2.0"
infer = { version = "0.15", optional = true }
lazy_static = "1.4.0"
libc = "0.2"
os_info = "3.0.1"
url = "2.1.1"
uuid = { version = "1.1", features = ["v4"], optional = true }
[dev-dependencies]
eval = "0.4"
[features]
appkit = ["core-foundation/mac_os_10_8_features"]
uikit = []
autolayout = []
default = ["appkit", "autolayout"]
cloudkit = []
color_fallbacks = []
quicklook = []
user-notifications = ["uuid"]
webview = ["infer"]
webview-downloading-macos = []
[package.metadata.bundle.example.ios-beta]
name = "ios-beta"
identifier = "com.cacao.ios-test"
category = "Developer Tool"
short_description = "An example Cacao iOS app."
long_description = "An example Cacao iOS app."
[[example]]
name = "webview_custom_protocol"
required-features = ["webview"]
[[example]]
name = "browser"
required-features = ["webview"]
[[example]]
name = "ios-beta"
required-features = ["uikit", "autolayout"]
[[example]]
name = "calculator"
required-features = ["appkit"]
[[example]]
name = "todos_list"
required-features = ["appkit"]
[[example]]
name = "animation"
required-features = ["appkit"]
[[example]]
name = "autolayout"
required-features = ["appkit"]
[[example]]
name = "custom_image_drawing"
required-features = ["appkit"]
[[example]]
name = "text_input"
required-features = ["appkit"]
[[example]]
name = "defaults"
required-features = ["appkit"]
[[example]]
name = "frame_layout"
required-features = ["appkit"]
[[example]]
name = "window"
required-features = ["appkit"]
[[example]]
name = "window_delegate"
required-features = ["appkit"]
[[example]]
name = "window_controller"
required-features = ["appkit"]
[[example]]
name = "safe_area"
required-features = ["appkit"]
[[example]]
name = "popover"
required-features = ["appkit"]