Deprecate cocoa, cocoa-foundation and io-surface and link to objc2 crates instead (#731)

* Deprecate cocoa-foundation

* Deprecate cocoa

* Deprecate io-surface
This commit is contained in:
Mads Marquart
2025-05-16 18:46:10 +02:00
committed by GitHub
parent 0e783c6355
commit 61b90e72da
17 changed files with 23 additions and 26 deletions
+1
View File
@@ -6,6 +6,7 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deprecated = "use the objc2 crate instead"]
use objc::runtime;
+1 -1
View File
@@ -6,7 +6,7 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deprecated = "use the objc2-foundation crate instead"]
#![allow(non_upper_case_globals)]
use crate::base::{id, nil, BOOL, NO, SEL};
+2 -1
View File
@@ -7,7 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(non_snake_case)]
//! This crate has been deprecated in favour of the `objc2-foundation` crate.
#![allow(non_snake_case, deprecated)]
pub mod base;
pub mod foundation;
+2
View File
@@ -1,3 +1,5 @@
#![allow(deprecated)]
#[cfg(test)]
mod foundation {
mod nsstring {
+2
View File
@@ -1,6 +1,8 @@
Cocoa-rs
--------
NOTE: This crate has been deprecated in favour of the `objc2` crates.
This crate provides Rust bindings to Cocoa for macOS. It's dual-licensed MIT /
Apache 2.0. If you'd like to help improve cocoa-rs, check out [the Servo
contributing guide](https://github.com/servo/servo/blob/main/CONTRIBUTING.md)!
+1
View File
@@ -1,3 +1,4 @@
#![allow(deprecated)] // the cocoa crate is deprecated
use cocoa::base::{id, nil, selector, NO};
use cocoa::appkit::{
+1
View File
@@ -1,3 +1,4 @@
#![allow(deprecated)] // the cocoa crate is deprecated
use cocoa::appkit::{
NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps,
NSApplicationActivationPolicyRegular, NSApplicationPresentationOptions, NSBackingStoreBuffered,
+1
View File
@@ -1,3 +1,4 @@
#![allow(deprecated)] // the cocoa crate is deprecated
use cocoa::appkit::{
NSApp, NSApplication, NSApplicationActivateIgnoringOtherApps,
NSApplicationActivationPolicyRegular, NSBackingStoreBuffered, NSMenu, NSMenuItem,
@@ -1,3 +1,4 @@
#![allow(deprecated)] // the cocoa crate is deprecated
use cocoa::base::{nil, selector, NO};
use objc::*;
+1
View File
@@ -1,3 +1,4 @@
#![allow(deprecated)] // the cocoa crate is deprecated
use cocoa::base::{id, nil, selector, NO};
use cocoa::appkit::{
+1
View File
@@ -7,6 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deprecated = "use the objc2-app-kit crate instead"]
#![allow(non_upper_case_globals)]
use crate::base::{id, BOOL, SEL};
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub use cocoa_foundation::base::*;
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub use cocoa_foundation::foundation::*;
+4 -3
View File
@@ -7,14 +7,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! This crate has been deprecated in favour of the `objc2` crates.
#![crate_name = "cocoa"]
#![crate_type = "rlib"]
#![allow(non_snake_case)]
#![allow(non_snake_case, deprecated)]
#[cfg(target_os = "macos")]
pub mod appkit;
pub mod base;
pub mod foundation;
pub use cocoa_foundation::base;
pub use cocoa_foundation::foundation;
#[cfg(target_os = "macos")]
pub mod quartzcore;
#[macro_use]
+1
View File
@@ -38,6 +38,7 @@
/// # }
/// ```
#[macro_export]
#[deprecated = "use the objc2::define_class! macro instead"]
macro_rules! delegate {
(
$name:expr, {
+1
View File
@@ -7,6 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deprecated = "use the objc2-quartz-core crate instead"]
#![allow(non_upper_case_globals)]
use bitflags::bitflags;
+2
View File
@@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! This crate has been deprecated in favour of the `objc2-io-surface` crate.
#![deprecated = "use the objc2-io-surface crate instead"]
#![crate_name = "io_surface"]
#![crate_type = "rlib"]