Skip to content

Commit

Permalink
Release v1.0 (#25)
Browse files Browse the repository at this point in the history
* Bump version to 1.0.0

* Add `os::macos-apis` cargo category

* Use `game-development` category slug instead of `game-engines`

* Add `html_root_url`

* Use cargo add in README

* Direct README readers to the docs

* Add note in changelog about no longer depending on rwh
  • Loading branch information
madsmtm authored Sep 9, 2024
1 parent 8cb241c commit c38c759
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# 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.
- Use `objc2` internally.
- 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.

Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "raw-window-metal"
version = "0.4.0"
# Remember to update html_root_url in lib.rs
version = "1.0.0"
license = "MIT OR Apache-2.0"
edition = "2021"
description = "Interop library between Metal and raw-window-handle"
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-development", "graphics", "os::macos-apis"]
exclude = [".github/*"]

[features]
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@

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
```

See [the docs](https://docs.rs/raw-window-metal) for examples and further information.

## License

Licensed under either of
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/1.0.0")]

mod observer;

Expand Down

0 comments on commit c38c759

Please sign in to comment.