Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0 #25

Merged
merged 7 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
madsmtm marked this conversation as resolved.
Show resolved Hide resolved

- 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")]
madsmtm marked this conversation as resolved.
Show resolved Hide resolved

mod observer;

Expand Down
Loading