Skip to content

Commit

Permalink
Add READMEs, update Cargo.toml, release v0.3.0 of all crates
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed Oct 21, 2024
1 parent 8e76915 commit 2db986f
Show file tree
Hide file tree
Showing 24 changed files with 96 additions and 45 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# yakui Changelog

## Unreleased Changes
**See <https://github.com/LPGhatguy/yakui/compare/v0.2.0...main>**
**See <https://github.com/LPGhatguy/yakui/compare/v0.3.0...main>**

## 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.
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ yakui has the following priorities:

<div align="center">
<div><img width="760" id="panels" src="assets/ms80-editor.png" /></div>
<label for="#panels">yakui being used in the editor for <a href="https://secondhalf.games/">MS80</a></code></label>
<label for="#panels">yakui being used in the editor for <a href="https://secondhalf.games/">MS80</a></label>
</div>

[Flutter]: https://flutter.dev/
Expand All @@ -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" }
Expand Down Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions crates/yakui-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[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"

[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" }
Expand Down
6 changes: 6 additions & 0 deletions crates/yakui-app/README.md
Original file line number Diff line number Diff line change
@@ -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`]
2 changes: 2 additions & 0 deletions crates/yakui-app/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![doc = include_str!("../README.md")]

mod multisampling;

use winit::{dpi::PhysicalSize, event::WindowEvent, event_loop::ActiveEventLoop, window::Window};
Expand Down
2 changes: 1 addition & 1 deletion crates/yakui-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 8 additions & 0 deletions crates/yakui-core/README.md
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 1 addition & 2 deletions crates/yakui-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
clippy::collapsible_if
)]
#![deny(missing_docs)]

//! TODO: Crate docs
#![doc = include_str!("../README.md")]

#[macro_use]
mod mopmopa;
Expand Down
7 changes: 4 additions & 3 deletions crates/yakui-vulkan/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
11 changes: 11 additions & 0 deletions crates/yakui-vulkan/README.md
Original file line number Diff line number Diff line change
@@ -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`
24 changes: 5 additions & 19 deletions crates/yakui-vulkan/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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.
///
Expand Down
1 change: 1 addition & 0 deletions crates/yakui-vulkan/src/vulkan_texture.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
4 changes: 2 additions & 2 deletions crates/yakui-wgpu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[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"

# 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"] }
Expand Down
5 changes: 5 additions & 0 deletions crates/yakui-wgpu/README.md
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions crates/yakui-wgpu/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(clippy::new_without_default)]
#![doc = include_str!("../README.md")]

mod bindgroup_cache;
mod buffer;
Expand Down
4 changes: 2 additions & 2 deletions crates/yakui-widgets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions crates/yakui-widgets/README.md
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions crates/yakui-widgets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions crates/yakui-winit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[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"

# 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"] }
1 change: 1 addition & 0 deletions crates/yakui-winit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`yakui_winit` is a winit backend for [yakui](https://github.com/SecondHalfGames/yakui), a declarative UI library for games.
2 changes: 2 additions & 0 deletions crates/yakui-winit/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![doc = include_str!("../README.md")]

mod keys;

use winit::dpi::PhysicalSize;
Expand Down
6 changes: 3 additions & 3 deletions crates/yakui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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" }
Expand Down
8 changes: 8 additions & 0 deletions crates/yakui/README.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 2 additions & 0 deletions crates/yakui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![doc = include_str!("../README.md")]

pub use yakui_core::geometry::*;
pub use yakui_core::*;

Expand Down

0 comments on commit 2db986f

Please sign in to comment.