diff --git a/CHANGELOG.md b/CHANGELOG.md index 301486dd..fc557fd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ # yakui Changelog ## Unreleased Changes -**See ** +**See ** + +## 0.3.0 — 2024-10-20 +It's been a minute since any crates.io releases were published! This is a release to make yakui a bit more accessible. + +To see a summary of all of the changes since 0.2.0, check out [the commit log from GitHub](https://github.com/LPGhatguy/yakui/compare/v0.2.0...v0.3.0). ## 0.2.0 — 2022-09-17 This release features improved documentation and several major improvements to yakui's implementation and interface. diff --git a/README.md b/README.md index 07c2ea85..385e0673 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ yakui has the following priorities:
- +
[Flutter]: https://flutter.dev/ @@ -43,8 +43,13 @@ yakui has the following priorities: * [License](#license) ## Getting Started -Add the [`yakui`] crate to your project: +Add the [`yakui`] crate to your project, either from crates.io: +```bash +cargo add yakui +``` + +...or by editing your `Cargo.toml` to use the latest version from GitHub: ```toml [dependencies] yakui = { git = "https://github.com/SecondHalfGames/yakui" } @@ -74,7 +79,7 @@ Finally, call `paint()` and feed the result to your renderer: your_renderer.draw(yak.paint()); ``` -To see your UI, you'll need a renderer crate. You can also write your own integration for your game. Here are the officially supported renderer crates: +To see your UI, you'll need a renderer crate. You can also write your own renderer for your game. Here are the officially supported renderer crates: - [`yakui-wgpu`] — wgpu renderer - [`yakui-vulkan`] — Vulkan renderer diff --git a/crates/yakui-app/Cargo.toml b/crates/yakui-app/Cargo.toml index fdc26193..84c7e568 100644 --- a/crates/yakui-app/Cargo.toml +++ b/crates/yakui-app/Cargo.toml @@ -1,8 +1,7 @@ [package] name = "yakui-app" description = "Wrapper crate for yakui, a UI library for games" -publish = false -version = "0.0.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" @@ -10,11 +9,11 @@ edition = "2021" [features] [dependencies] -yakui = { path = "../yakui" } -yakui-core = { path = "../yakui-core" } -yakui-widgets = { path = "../yakui-widgets", default-features = false } -yakui-winit = { path = "../yakui-winit" } -yakui-wgpu = { path = "../yakui-wgpu" } +yakui = { path = "../yakui", version = "0.3.0" } +yakui-core = { path = "../yakui-core", version = "0.3.0" } +yakui-widgets = { path = "../yakui-widgets", version = "0.3.0", default-features = false } +yakui-winit = { path = "../yakui-winit", version = "0.3.0" } +yakui-wgpu = { path = "../yakui-wgpu", version = "0.3.0" } profiling = { version = "1.0.6", optional = true } winit = { version = "0.30.0" } diff --git a/crates/yakui-app/README.md b/crates/yakui-app/README.md new file mode 100644 index 00000000..8e155a3e --- /dev/null +++ b/crates/yakui-app/README.md @@ -0,0 +1,6 @@ +`yakui_app` is an easy way to get started with [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. + +You might also be interested in: +* [`yakui`] +* [`yakui_widgets`] +* [`yakui_core`] \ No newline at end of file diff --git a/crates/yakui-app/src/lib.rs b/crates/yakui-app/src/lib.rs index 1a199b3a..26a1ffe2 100644 --- a/crates/yakui-app/src/lib.rs +++ b/crates/yakui-app/src/lib.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + mod multisampling; use winit::{dpi::PhysicalSize, event::WindowEvent, event_loop::ActiveEventLoop, window::Window}; diff --git a/crates/yakui-core/Cargo.toml b/crates/yakui-core/Cargo.toml index 3381c682..cbe7efbc 100644 --- a/crates/yakui-core/Cargo.toml +++ b/crates/yakui-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yakui-core" description = "Core crate for yakui, a UI library for games" -version = "0.2.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" diff --git a/crates/yakui-core/README.md b/crates/yakui-core/README.md new file mode 100644 index 00000000..fbf0bf23 --- /dev/null +++ b/crates/yakui-core/README.md @@ -0,0 +1,8 @@ +`yakui_core` implements the DOM and wiget APIs for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. + +This entire crate is also re-exported from the [`yakui`](https://docs.rs/yakui) crate. + +You might also be interested in: +* [`yakui`](https://docs.rs/yakui) +* [`yakui_widgets`](https://docs.rs/yakui-widgets) +* [`yakui_app`](https://docs.rs/yakui-app) \ No newline at end of file diff --git a/crates/yakui-core/src/lib.rs b/crates/yakui-core/src/lib.rs index eab8bd46..abdd7f48 100644 --- a/crates/yakui-core/src/lib.rs +++ b/crates/yakui-core/src/lib.rs @@ -4,8 +4,7 @@ clippy::collapsible_if )] #![deny(missing_docs)] - -//! TODO: Crate docs +#![doc = include_str!("../README.md")] #[macro_use] mod mopmopa; diff --git a/crates/yakui-vulkan/Cargo.toml b/crates/yakui-vulkan/Cargo.toml index cec67cf5..a14b1917 100644 --- a/crates/yakui-vulkan/Cargo.toml +++ b/crates/yakui-vulkan/Cargo.toml @@ -1,20 +1,21 @@ [package] name = "yakui-vulkan" description = "vulkan bindings for yakui" -version = "0.2.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" [dependencies] -yakui = { path = "../yakui" } -yakui-core = { path = "../yakui-core" } +yakui-core = { path = "../yakui-core", version = "0.3.0" } ash = { version = "0.38", default-features = false, features = ["std"] } bytemuck = "1.13.0" thunderdome = "0.6.0" [dev-dependencies] +yakui = { path = "../yakui", version = "0.3.0" } + ash = { version = "0.38", default-features = false, features = ["loaded"] } ash-window = "0.13" image = "0.24.5" diff --git a/crates/yakui-vulkan/README.md b/crates/yakui-vulkan/README.md new file mode 100644 index 00000000..77442c6f --- /dev/null +++ b/crates/yakui-vulkan/README.md @@ -0,0 +1,11 @@ +A Vulkan renderer for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. Uses [`ash`] to wrap Vulkan related functionality. + +The main entrypoint is the [`YakuiVulkan`] struct which creates a [`ash::vk::RenderPass`] and [`ash::vk::Pipeline`] to draw yakui GUIs. This is initialised by populating a [`VulkanContext`] helper struct to pass down the relevant hooks into your Vulkan renderer. + +Like most Vulkan applications, this crate uses unsafe Rust! No checks are made to ensure that Vulkan handles are valid, so take note of the safety warnings on the various methods of [`YakuiVulkan`]. + +Currently this crate only supports drawing to images in the `VK_IMAGE_LAYOUT_PRESENT_SRC_KHR` layout, but future releases will support drawing to any arbitrary [`vk::ImageView`]. + +This crate requires at least Vulkan 1.2 and a GPU with support for `VkPhysicalDeviceDescriptorIndexingFeatures.descriptorBindingPartiallyBound`. You should also, you know, enable that feature, or Vulkan Validation Layers will get mad at you. You definitely don't want that. + +For an example of how to use this crate, check out `examples/demo.rs` \ No newline at end of file diff --git a/crates/yakui-vulkan/src/lib.rs b/crates/yakui-vulkan/src/lib.rs index 70c48e94..72528521 100644 --- a/crates/yakui-vulkan/src/lib.rs +++ b/crates/yakui-vulkan/src/lib.rs @@ -1,21 +1,5 @@ #![deny(missing_docs)] - -//! A Vulkan backend for the [`yakui`] crate. Uses [`ash`] to wrap Vulkan related functionality. -//! -//! The main entrypoint is the [`YakuiVulkan`] struct which creates a [`ash::vk::RenderPass`] and [`ash::vk::Pipeline`] -//! to draw yakui GUIs. This is initialised by populating a [`VulkanContext`] helper struct to pass down the relevant hooks -//! into your Vulkan renderer. -//! -//! Like most Vulkan applications, this crate uses unsafe Rust! No checks are made to ensure that Vulkan handles are valid, -//! so take note of the safety warnings on the various methods of [`YakuiVulkan`]. -//! -//! Currently this crate only supports drawing to images in the `VK_IMAGE_LAYOUT_PRESENT_SRC_KHR` layout, but future -//! releases will support drawing to any arbitrary [`vk::ImageView`]. -//! -//! This crate requires at least Vulkan 1.2 and a GPU with support for `VkPhysicalDeviceDescriptorIndexingFeatures.descriptorBindingPartiallyBound`. -//! You should also, you know, enable that feature, or Vulkan Validation Layers will get mad at you. You definitely don't want that. -//! -//! For an example of how to use this crate, check out `examples/demo.rs` +#![doc = include_str!("../README.md")] mod buffer; mod descriptors; @@ -32,8 +16,10 @@ use std::{collections::HashMap, ffi::CStr, io::Cursor}; pub use vulkan_context::VulkanContext; use vulkan_texture::{UploadQueue, NO_TEXTURE_ID}; pub use vulkan_texture::{VulkanTexture, VulkanTextureCreateInfo}; -use yakui::geometry::UVec2; -use yakui::{paint::Vertex as YakuiVertex, ManagedTextureId}; + +use yakui_core as yakui; +use yakui_core::geometry::UVec2; +use yakui_core::{paint::Vertex as YakuiVertex, ManagedTextureId}; /// A struct wrapping everything needed to render yakui on Vulkan. This will be your main entry point. /// diff --git a/crates/yakui-vulkan/src/vulkan_texture.rs b/crates/yakui-vulkan/src/vulkan_texture.rs index 712bea18..4698762d 100644 --- a/crates/yakui-vulkan/src/vulkan_texture.rs +++ b/crates/yakui-vulkan/src/vulkan_texture.rs @@ -1,6 +1,7 @@ use std::{collections::VecDeque, mem}; use ash::vk; +use yakui_core as yakui; use crate::{buffer::Buffer, descriptors::Descriptors, vulkan_context::VulkanContext}; diff --git a/crates/yakui-wgpu/Cargo.toml b/crates/yakui-wgpu/Cargo.toml index 118b3611..1aea6e97 100644 --- a/crates/yakui-wgpu/Cargo.toml +++ b/crates/yakui-wgpu/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yakui-wgpu" description = "wgpu renderer for yakui" -version = "0.2.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" @@ -9,7 +9,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -yakui-core = { path = "../yakui-core", version = "0.2.0" } +yakui-core = { path = "../yakui-core", version = "0.3.0" } wgpu = "22.0.0" glam = { version = "0.27.0", features = ["bytemuck"] } diff --git a/crates/yakui-wgpu/README.md b/crates/yakui-wgpu/README.md new file mode 100644 index 00000000..df8383a3 --- /dev/null +++ b/crates/yakui-wgpu/README.md @@ -0,0 +1,5 @@ +`yakui_wgpu` is a wgpu renderer for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. + +In addition to a renderer, you'll also need a windowing crate. Here are some options: + +- [`yakui_winit`](https://docs.rs/yakui-winit) \ No newline at end of file diff --git a/crates/yakui-wgpu/src/lib.rs b/crates/yakui-wgpu/src/lib.rs index d303b1be..28991465 100644 --- a/crates/yakui-wgpu/src/lib.rs +++ b/crates/yakui-wgpu/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::new_without_default)] +#![doc = include_str!("../README.md")] mod bindgroup_cache; mod buffer; diff --git a/crates/yakui-widgets/Cargo.toml b/crates/yakui-widgets/Cargo.toml index aea8cd4c..13ca988c 100644 --- a/crates/yakui-widgets/Cargo.toml +++ b/crates/yakui-widgets/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yakui-widgets" description = "Built-in widgets for yakui" -version = "0.2.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" @@ -13,7 +13,7 @@ default = ["default-fonts"] default-fonts = [] [dependencies] -yakui-core = { path = "../yakui-core", version = "0.2.0" } +yakui-core = { path = "../yakui-core", version = "0.3.0" } fontdue = "0.8.0" thunderdome = "0.6.0" diff --git a/crates/yakui-widgets/README.md b/crates/yakui-widgets/README.md new file mode 100644 index 00000000..a59969df --- /dev/null +++ b/crates/yakui-widgets/README.md @@ -0,0 +1,8 @@ +`yakui_widgets` contains the built-in widgets and related helpers for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. + +Most of this crate is also re-exported from the [`yakui`](https://docs.rs/yakui) crate. + +You might also be interested in: +* [`yakui`](https://docs.rs/yakui) +* [`yakui_core`] +* [`yakui_app`](https://docs.rs/yakui-app) \ No newline at end of file diff --git a/crates/yakui-widgets/src/lib.rs b/crates/yakui-widgets/src/lib.rs index 15308993..b9e8b54a 100644 --- a/crates/yakui-widgets/src/lib.rs +++ b/crates/yakui-widgets/src/lib.rs @@ -3,6 +3,7 @@ // out our Response type even if it's unit. clippy::new_without_default, )] +#![doc = include_str!("../README.md")] mod ignore_debug; diff --git a/crates/yakui-winit/Cargo.toml b/crates/yakui-winit/Cargo.toml index fc707131..eb85cce9 100644 --- a/crates/yakui-winit/Cargo.toml +++ b/crates/yakui-winit/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yakui-winit" description = "winit bindings for yakui" -version = "0.2.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" @@ -9,7 +9,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -yakui-core = { path = "../yakui-core", version = "0.2.0" } +yakui-core = { path = "../yakui-core", version = "0.3.0" } # TODO: Disable all default features once supported (https://github.com/rust-windowing/winit/issues/3174) winit = { version = "0.30.0", default-features = false, features = ["x11"] } diff --git a/crates/yakui-winit/README.md b/crates/yakui-winit/README.md new file mode 100644 index 00000000..55febef4 --- /dev/null +++ b/crates/yakui-winit/README.md @@ -0,0 +1 @@ +`yakui_winit` is a winit backend for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. \ No newline at end of file diff --git a/crates/yakui-winit/src/lib.rs b/crates/yakui-winit/src/lib.rs index 2a201936..adadd1b4 100644 --- a/crates/yakui-winit/src/lib.rs +++ b/crates/yakui-winit/src/lib.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + mod keys; use winit::dpi::PhysicalSize; diff --git a/crates/yakui/Cargo.toml b/crates/yakui/Cargo.toml index 31b18a85..ec1f1a88 100644 --- a/crates/yakui/Cargo.toml +++ b/crates/yakui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yakui" description = "A UI library for games" -version = "0.2.0" +version = "0.3.0" license = "MIT OR Apache-2.0" repository = "https://github.com/LPGhatguy/yakui" edition = "2021" @@ -12,8 +12,8 @@ default = ["default-fonts"] default-fonts = ["yakui-widgets/default-fonts"] [dependencies] -yakui-core = { path = "../yakui-core", version = "0.2.0" } -yakui-widgets = { path = "../yakui-widgets", version = "0.2.0", default-features = false } +yakui-core = { path = "../yakui-core", version = "0.3.0" } +yakui-widgets = { path = "../yakui-widgets", version = "0.3.0", default-features = false } [dev-dependencies] bootstrap = { path = "../bootstrap" } diff --git a/crates/yakui/README.md b/crates/yakui/README.md new file mode 100644 index 00000000..f1871141 --- /dev/null +++ b/crates/yakui/README.md @@ -0,0 +1,8 @@ +`yakui` packages and re-exports the runtime and built-in widgets for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games. + +Everything in this crate is exported from [`yakui_core`] and [`yakui_widgets`]. + +You might also be interested in: +* [`yakui_widgets`] +* [`yakui_core`] +* [`yakui_app`](https://docs.rs/yakui-app) \ No newline at end of file diff --git a/crates/yakui/src/lib.rs b/crates/yakui/src/lib.rs index 8edf80ad..13db6c26 100644 --- a/crates/yakui/src/lib.rs +++ b/crates/yakui/src/lib.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + pub use yakui_core::geometry::*; pub use yakui_core::*;