From 4cc9f542351387663f9b558a64d663eb8b6c659a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 13:37:40 +0200 Subject: [PATCH 1/7] Add `os::macos-apis` cargo category --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 334263d..43756e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ documentation = "https://docs.rs/raw-window-metal" repository = "https://github.com/rust-windowing/raw-window-metal" readme = "README.md" keywords = ["window", "metal", "graphics"] -categories = ["game-engines", "graphics"] +categories = ["game-engines", "graphics", "os::macos-apis"] exclude = [".github/*"] [features] From e642d910ec20f1fd602afb89c77e71ced85b5b71 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 13:38:43 +0200 Subject: [PATCH 2/7] Add `html_root_url` --- Cargo.toml | 1 + src/lib.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 43756e9..b2982b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "raw-window-metal" +# Remember to update html_root_url in lib.rs version = "0.4.0" license = "MIT OR Apache-2.0" edition = "2021" diff --git a/src/lib.rs b/src/lib.rs index 51c5465..882537f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -131,6 +131,8 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc)))] #![deny(unsafe_op_in_unsafe_fn)] #![warn(clippy::undocumented_unsafe_blocks)] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/raw-window-metal/0.4.0")] mod observer; From ca2b3b95b45b975ccd562c7f907c73f971b24dbc Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 13:40:11 +0200 Subject: [PATCH 3/7] Use cargo add --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 214d26c..005b5e7 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ Interoperability library for Metal and [`raw-window-handle`](https://github.com/rust-windowing/raw-window-handle) for surface creation. -```toml -raw-window-metal = "0.4" -``` - `CAMetalLayer` is the common entrypoint for graphics APIs (e.g `gfx` or `MoltenVK`), but the handles provided by window libraries may not include such a layer. This library may extract either this layer or allocate a new one. +```console +cargo add raw-window-metal +``` + ## License Licensed under either of From 535c68c0e7cf67d9161b2f136a83d99e85d136a5 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 13:41:02 +0200 Subject: [PATCH 4/7] Direct README readers to the docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 005b5e7..dc3de9a 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ This library may extract either this layer or allocate a new one. cargo add raw-window-metal ``` +See [the docs](https://docs.rs/raw-window-metal) for examples and further information. + ## License Licensed under either of From 469f349525c972ab70bc0cbcd57109bb4bda746f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 13:43:40 +0200 Subject: [PATCH 5/7] Bump version to 1.0.0 --- CHANGELOG.md | 3 +++ Cargo.toml | 2 +- src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf08b2b..90f8486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Unreleased + +# 1.0.0 (2024-09-09) + - Bump Rust Edition from 2018 to 2021. - Make `Layer`'s implementation details private; it is now a struct with `as_ptr`, `into_raw` and `is_existing` accessor methods. - Add support for tvOS, watchOS and visionOS. diff --git a/Cargo.toml b/Cargo.toml index b2982b4..ee40c5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "raw-window-metal" # Remember to update html_root_url in lib.rs -version = "0.4.0" +version = "1.0.0" license = "MIT OR Apache-2.0" edition = "2021" description = "Interop library between Metal and raw-window-handle" diff --git a/src/lib.rs b/src/lib.rs index 882537f..e53ac34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -132,7 +132,7 @@ #![deny(unsafe_op_in_unsafe_fn)] #![warn(clippy::undocumented_unsafe_blocks)] // Update in Cargo.toml as well. -#![doc(html_root_url = "https://docs.rs/raw-window-metal/0.4.0")] +#![doc(html_root_url = "https://docs.rs/raw-window-metal/1.0.0")] mod observer; From 384ff5ce871a0716e618f2cfd407adb0c7205db3 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 15:52:35 +0200 Subject: [PATCH 6/7] Add note in changelog about no longer depending on rwh --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90f8486..3a01535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ - Move `Layer` constructors to the type itself. - `appkit::metal_layer_from_ns_view` is now `Layer::from_ns_view`. - `uikit::metal_layer_from_ui_view` is now `Layer::from_ui_view`. + + `raw-window-handle` types are also no longer exposed directly in the API. + This allows us to decouple the library from `raw-window-handle`'s versioning. - Added `Layer::from_layer` to construct a `Layer` from a `CALayer` directly. - Fixed layers not automatically resizing to match the super layer they were created from. From 6d4a85db5d6e9c74583b5f8fe5f9f25c75c8ac96 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 9 Sep 2024 15:53:42 +0200 Subject: [PATCH 7/7] Use `game-development` category slug instead of `game-engines` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ee40c5b..3660435 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ documentation = "https://docs.rs/raw-window-metal" repository = "https://github.com/rust-windowing/raw-window-metal" readme = "README.md" keywords = ["window", "metal", "graphics"] -categories = ["game-engines", "graphics", "os::macos-apis"] +categories = ["game-development", "graphics", "os::macos-apis"] exclude = [".github/*"] [features]