-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[Merged by Bors] - Prepare crevice for vendored release #3394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
708e038
rename crevice to bevy_crevice
mockersf 31cd270
rename in crevice tomls
mockersf dc38532
rename in crevice code
mockersf 3bc6ab3
use bevy_crevice reexport from bevy_render
mockersf f79700a
fix derive macro
mockersf 96efab7
change re-export path
mockersf cdc4e53
update readme and cargos
mockersf b905e03
trailing space
mockersf ecded3d
Merge branch 'main' into unique-crevice-entry
cart 43bb10c
add crates to publish script
mockersf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[package] | ||
name = "crevice" | ||
description = "Create GLSL-compatible versions of structs with explicitly-initialized padding" | ||
version = "0.8.0" | ||
name = "bevy_crevice" | ||
description = "Create GLSL-compatible versions of structs with explicitly-initialized padding (Bevy version)" | ||
version = "0.5.0" | ||
edition = "2021" | ||
authors = ["Lucien Greathouse <[email protected]>"] | ||
documentation = "https://docs.rs/crevice" | ||
homepage = "https://github.com/LPGhatguy/crevice" | ||
repository = "https://github.com/LPGhatguy/crevice" | ||
repository = "https://github.com/bevyengine/bevy" | ||
readme = "README.md" | ||
keywords = ["glsl", "std140", "std430"] | ||
license = "MIT OR Apache-2.0" | ||
|
@@ -23,7 +23,7 @@ std = [] | |
# default-members = ["crevice-derive", "crevice-tests"] | ||
|
||
[dependencies] | ||
crevice-derive = { version = "0.8.0", path = "crevice-derive" } | ||
bevy-crevice-derive = { version = "0.5.0", path = "bevy-crevice-derive" } | ||
|
||
bytemuck = "1.4.1" | ||
mint = "0.5.8" | ||
|
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[package] | ||
name = "crevice-derive" | ||
description = "Derive crate for the 'crevice' crate" | ||
version = "0.8.0" | ||
name = "bevy-crevice-derive" | ||
description = "Derive crate for the 'crevice' crate (Bevy version)" | ||
version = "0.5.0" | ||
edition = "2018" | ||
authors = ["Lucien Greathouse <[email protected]>"] | ||
documentation = "https://docs.rs/crevice-derive" | ||
homepage = "https://github.com/LPGhatguy/crevice" | ||
repository = "https://github.com/LPGhatguy/crevice" | ||
repository = "https://github.com/bevyengine/bevy" | ||
license = "MIT OR Apache-2.0" | ||
|
||
[features] | ||
|
@@ -24,3 +24,4 @@ proc-macro = true | |
syn = "1.0.40" | ||
quote = "1.0.7" | ||
proc-macro2 = "1.0.21" | ||
bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.5.0" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
mod glsl; | ||
mod layout; | ||
|
||
use bevy_macro_utils::BevyManifest; | ||
use proc_macro::TokenStream as CompilerTokenStream; | ||
|
||
use syn::{parse_macro_input, DeriveInput, Path}; | ||
|
||
#[proc_macro_derive(AsStd140)] | ||
pub fn derive_as_std140(input: CompilerTokenStream) -> CompilerTokenStream { | ||
let input = parse_macro_input!(input as DeriveInput); | ||
let expanded = layout::emit(input, "Std140", "std140", 16); | ||
|
||
CompilerTokenStream::from(expanded) | ||
} | ||
|
||
#[proc_macro_derive(AsStd430)] | ||
pub fn derive_as_std430(input: CompilerTokenStream) -> CompilerTokenStream { | ||
let input = parse_macro_input!(input as DeriveInput); | ||
let expanded = layout::emit(input, "Std430", "std430", 0); | ||
|
||
CompilerTokenStream::from(expanded) | ||
} | ||
|
||
#[proc_macro_derive(GlslStruct)] | ||
pub fn derive_glsl_struct(input: CompilerTokenStream) -> CompilerTokenStream { | ||
let input = parse_macro_input!(input as DeriveInput); | ||
let expanded = glsl::emit(input); | ||
|
||
CompilerTokenStream::from(expanded) | ||
} | ||
|
||
const BEVY: &str = "bevy"; | ||
const BEVY_CREVICE: &str = "bevy_crevice"; | ||
const BEVY_RENDER: &str = "bevy_render"; | ||
|
||
fn bevy_crevice_path() -> Path { | ||
let bevy_manifest = BevyManifest::default(); | ||
bevy_manifest | ||
.maybe_get_path(crate::BEVY) | ||
.map(|bevy_path| { | ||
let mut segments = bevy_path.segments; | ||
segments.push(BevyManifest::parse_str("render")); | ||
segments.push(BevyManifest::parse_str("render_resource")); | ||
Path { | ||
leading_colon: None, | ||
segments, | ||
} | ||
}) | ||
.or_else(|| bevy_manifest.maybe_get_path(crate::BEVY_RENDER)) | ||
.map(|bevy_render_path| { | ||
let mut segments = bevy_render_path.segments; | ||
segments.push(BevyManifest::parse_str("render_resource")); | ||
Path { | ||
leading_colon: None, | ||
segments, | ||
} | ||
}) | ||
.unwrap_or_else(|| bevy_manifest.get_path(crate::BEVY_CREVICE)) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.