Rename examples to ash-examples (#820)

[Dependabot complains] that:

     the binary target name `examples` is forbidden, it conflicts with with cargo's build directory names

And fails to provide dependency upgrades for Rust code.  Fix that by
renaming the folder and crate to `ash-examples`.

[Dependabot complains]: https://github.com/ash-rs/ash/network/updates/748770724
This commit is contained in:
Marijn Suijten 2023-11-17 17:27:28 +01:00 committed by GitHub
parent c87eb53b92
commit 4bbfa54146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 19 additions and 18 deletions

View file

@ -24,7 +24,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.64.0 - uses: dtolnay/rust-toolchain@1.64.0
- run: cargo check -p ash-window -p examples --all-features - run: cargo check -p ash-window -p ash-examples --all-features
# TODO: add a similar job for the rewrite once that generates code # TODO: add a similar job for the rewrite once that generates code
generated: generated:

View file

@ -1,10 +1,10 @@
[workspace] [workspace]
members = [ members = [
"examples", "analysis",
"ash", "ash",
"ash-examples",
"ash-rewrite", "ash-rewrite",
"ash-window", "ash-window",
"analysis",
"generator", "generator",
"generator-rewrite", "generator-rewrite",
] ]

View file

@ -195,7 +195,7 @@ If, on the other hand, your application cannot handle Vulkan being missing at ru
## Example ## Example
You can find the examples [here](https://github.com/ash-rs/ash/tree/master/examples). You can find the examples [here](https://github.com/ash-rs/ash/tree/master/ash-examples).
All examples currently require: the LunarG Validation layers and a Vulkan library that is visible in your `PATH`. An easy way to get started is to use the [LunarG Vulkan SDK](https://lunarg.com/vulkan-sdk/) All examples currently require: the LunarG Validation layers and a Vulkan library that is visible in your `PATH`. An easy way to get started is to use the [LunarG Vulkan SDK](https://lunarg.com/vulkan-sdk/)
#### Windows #### Windows
@ -218,24 +218,22 @@ VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d \
cargo run ... cargo run ...
``` ```
### [Triangle](https://github.com/ash-rs/ash/blob/master/examples/src/bin/triangle.rs) ### [Triangle](https://github.com/ash-rs/ash/blob/master/ash-examples/src/bin/triangle.rs)
Displays a triangle with vertex colors. Displays a triangle with vertex colors.
``` ```sh
cd examples cargo run -p ash-examples --bin triangle
cargo run --bin triangle
``` ```
![screenshot](http://i.imgur.com/PQZcL6w.jpg) ![screenshot](http://i.imgur.com/PQZcL6w.jpg)
### [Texture](https://github.com/ash-rs/ash/blob/master/examples/src/bin/texture.rs) ### [Texture](https://github.com/ash-rs/ash/blob/master/ash-examples/src/bin/texture.rs)
Displays a texture on a quad. Displays a texture on a quad.
``` ```sh
cd examples cargo run -p ash-examples --bin texture
cargo run --bin texture
``` ```
![texture](http://i.imgur.com/trow00H.png) ![texture](http://i.imgur.com/trow00H.png)

View file

@ -1,8 +1,9 @@
[package] [package]
name = "examples" name = "ash-examples"
version = "0.1.0" version = "0.1.0"
authors = ["maik klein <maikklein@googlemail.com>"] authors = ["maik klein <maikklein@googlemail.com>"]
edition = "2021" edition = "2021"
publish = false
[dependencies] [dependencies]
image = "0.24" image = "0.24"

View file

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View file

@ -6,8 +6,7 @@ use std::os::raw::c_void;
use ash::util::*; use ash::util::*;
use ash::vk; use ash::vk;
use ash_examples::*;
use examples::*;
#[derive(Clone, Debug, Copy)] #[derive(Clone, Debug, Copy)]
struct Vertex { struct Vertex {

View file

@ -1,12 +1,13 @@
use ash::util::*;
use ash::vk;
use examples::*;
use std::default::Default; use std::default::Default;
use std::ffi::CStr; use std::ffi::CStr;
use std::io::Cursor; use std::io::Cursor;
use std::mem; use std::mem;
use std::mem::align_of; use std::mem::align_of;
use ash::util::*;
use ash::vk;
use ash_examples::*;
#[derive(Clone, Debug, Copy)] #[derive(Clone, Debug, Copy)]
struct Vertex { struct Vertex {
pos: [f32; 4], pos: [f32; 4],

View file

@ -2,6 +2,7 @@
name = "generator-rewrite" name = "generator-rewrite"
version = "2.0.0" version = "2.0.0"
edition = "2021" edition = "2021"
publish = false
[dependencies] [dependencies]
analysis = { path = "../analysis" } analysis = { path = "../analysis" }

View file

@ -3,6 +3,7 @@ name = "generator"
version = "0.1.0" version = "0.1.0"
authors = ["Maik Klein <maikklein@googlemail.com>"] authors = ["Maik Klein <maikklein@googlemail.com>"]
edition = "2021" edition = "2021"
publish = false
[dependencies] [dependencies]
bindgen = "0.64" bindgen = "0.64"