Skip to content

Commit

Permalink
Rename examples to ash-examples
Browse files Browse the repository at this point in the history
Dependabot complains [1] 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`.

[1]: https://github.com/ash-rs/ash/network/updates/748770724
  • Loading branch information
MarijnS95 committed Nov 17, 2023
1 parent c87eb53 commit 7acc2bf
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- 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
generated:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[workspace]
members = [
"examples",
"analysis",
"ash",
"ash-examples",
"ash-rewrite",
"ash-window",
"analysis",
"generator",
"generator-rewrite",
]
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ If, on the other hand, your application cannot handle Vulkan being missing at ru

## 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/)

#### Windows
Expand All @@ -218,24 +218,22 @@ VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d \
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.

```
cd examples
cargo run --bin triangle
```sh
cargo run -p ash-examples --bin triangle
```

![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.

```
cd examples
cargo run --bin texture
```sh
cargo run -p ash-examples --bin texture
```

![texture](http://i.imgur.com/trow00H.png)
Expand Down
3 changes: 2 additions & 1 deletion examples/Cargo.toml → ash-examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
name = "examples"
name = "ash-examples"
version = "0.1.0"
authors = ["maik klein <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
image = "0.24"
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use std::os::raw::c_void;

use ash::util::*;
use ash::vk;

use examples::*;
use ash_examples::*;

#[derive(Clone, Debug, Copy)]
struct Vertex {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use ash::util::*;
use ash::vk;
use examples::*;
use std::default::Default;
use std::ffi::CStr;
use std::io::Cursor;
use std::mem;
use std::mem::align_of;

use ash::util::*;
use ash::vk;
use ash_examples::*;

#[derive(Clone, Debug, Copy)]
struct Vertex {
pos: [f32; 4],
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions generator-rewrite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "generator-rewrite"
version = "2.0.0"
edition = "2021"
publish = false

[dependencies]
analysis = { path = "../analysis" }
1 change: 1 addition & 0 deletions generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "generator"
version = "0.1.0"
authors = ["Maik Klein <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
bindgen = "0.64"
Expand Down

0 comments on commit 7acc2bf

Please sign in to comment.