Skip to content

Commit 00698e1

Browse files
committed
Revert "Add builder"
This reverts commit 853ecfa.
1 parent 1ae45cb commit 00698e1

File tree

12 files changed

+20
-117
lines changed

12 files changed

+20
-117
lines changed

.vscode/settings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"rust-analyzer.linkedProjects": [
33
"./examples/shaders/Cargo.toml",
4-
"./gravylib-helpers/Cargo.toml",
5-
"./gravylib-macros/Cargo.toml",
6-
"./gravylib-builder/Cargo.toml"
4+
"./gravylib_helpers/Cargo.toml",
5+
"./gravylib_macros/Cargo.toml",
76
],
87
"evenbettercomments.tags": [
98
{

Cargo.lock

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ winit = { version = "0.29", features = [
2929
"rwh_05" # This is to maintain support with the latest version of wgpu. Should be removed once wgpu implements rwh_06.
3030
] }
3131
cfg-if = "1.0.0"
32-
gravylib-helpers = { path = "./gravylib-helpers" }
33-
gravylib-macros = { path = "./gravylib-macros" }
32+
gravylib_helpers = { path = "./gravylib_helpers" }
33+
gravylib_macros = { path = "./gravylib_macros" }
3434
structopt = "0.3"
3535
strum = { version = "0.25", default_features = false, features = [
3636
"std",
@@ -48,7 +48,7 @@ shaders = { path = "./examples/shaders" }
4848

4949
[workspace]
5050
resolver = "2"
51-
members = ["examples/shaders", "gravylib-helpers", "gravylib-macros", "gravylib-builder"]
51+
members = ["examples/shaders", "gravylib_helpers", "gravylib_macros"]
5252

5353
[[example]]
5454
name = "standalone"

build.rs

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,10 @@
1-
use spirv_builder::{SpirvBuilder, MetadataPrintout};
2-
3-
use std::env;
41
use std::error::Error;
5-
use std::path::PathBuf;
6-
7-
fn main() -> Result<(), Box<dyn Error>> {
8-
println!("cargo:rerun-if-changed=build.rs");
9-
println!("cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS");
10-
println!("cargo:rerun-if-env-changed=CARGO_CFG_TARGET_ARCH");
11-
// While OUT_DIR is set for both build.rs and compiling the crate, PROFILE is only set in
12-
// build.rs. So, export it to crate compilation as well.
13-
let profile = env::var("PROFILE").unwrap();
14-
println!("cargo:rustc-env=PROFILE={profile}");
152

16-
let mut dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
17-
// Strip `$profile/build/*/out`.
18-
let ok = dir.ends_with("out")
19-
&& dir.pop()
20-
&& dir.pop()
21-
&& dir.ends_with("build")
22-
&& dir.pop()
23-
&& dir.ends_with(profile)
24-
&& dir.pop();
25-
assert!(ok);
26-
// NOTE(eddyb) this needs to be distinct from the `--target-dir` value that
27-
// `spirv-builder` generates in a similar way from `$OUT_DIR` and `$PROFILE`,
28-
// otherwise repeated `cargo build`s will cause build script reruns and the
29-
// rebuilding of `rustc_codegen_spirv` (likely due to common proc macro deps).
30-
let dir = dir.join("gravylib-builder");
31-
let status = std::process::Command::new("cargo")
32-
.args([
33-
"run",
34-
"--release",
35-
"-p",
36-
"gravylib-builder",
37-
"--target-dir",
38-
])
39-
.arg(dir)
40-
.env_remove("CARGO_ENCODED_RUSTFLAGS")
41-
.stderr(std::process::Stdio::inherit())
42-
.stdout(std::process::Stdio::inherit())
43-
.status()?;
44-
if !status.success() {
45-
if let Some(code) = status.code() {
46-
std::process::exit(code);
47-
} else {
48-
std::process::exit(1);
49-
}
50-
}
3+
use spirv_builder::{SpirvBuilder, MetadataPrintout};
514

5+
fn main() -> Result<(), Box<dyn Error>> {
526
// Internal shader-like dependencies, built alongside `gravylib`
53-
SpirvBuilder::new("gravylib-helpers", "spirv-unknown-vulkan1.1")
7+
SpirvBuilder::new("gravylib_helpers", "spirv-unknown-vulkan1.1")
548
.print_metadata(MetadataPrintout::Full)
559
.build()?;
5610

examples/shaders/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository.workspace = true
1111
crate-type = ["lib", "dylib"]
1212

1313
[dependencies]
14-
spirv-std.workspace = true
14+
spirv-std = { workspace = true }
1515
# use `gravylib` instead of these when creating your own shader crate
16-
gravylib-helpers = { path = "../../gravylib-helpers" }
17-
gravylib-macros = { path = "../../gravylib-macros" }
16+
gravylib_helpers = { path = "../../gravylib_helpers" }
17+
gravylib_macros = { path = "../../gravylib_macros" }

gravylib-builder/Cargo.toml

Lines changed: 0 additions & 17 deletions
This file was deleted.

gravylib-builder/src/bin/main.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

gravylib-builder/src/lib.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

gravylib-helpers/Cargo.toml renamed to gravylib_helpers/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "gravylib-helpers"
2+
name = "gravylib_helpers"
33
version = "0.1.0-alpha"
44
publish = false
55
authors.workspace = true
@@ -11,5 +11,5 @@ repository.workspace = true
1111
crate-type = ["lib", "dylib"]
1212

1313
[dependencies]
14-
spirv-std.workspace = true
14+
spirv-std = { workspace = true }
1515
bytemuck = { version = "1.6.3", features = ["derive"] }
File renamed without changes.

0 commit comments

Comments
 (0)