Skip to content
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

[WIP] Use cargo workspace. Move gfx_app in its own crate #1250

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 45 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,52 @@
# Copyright 2017 The Gfx-rs Developers.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[package]
name = "gfx_app"
version = "0.6.0"
description = "GFX example application framework"
name = "gfx"
version = "0.16.0"
description = "A high-performance, bindless graphics API"
homepage = "https://github.com/gfx-rs/gfx"
repository = "https://github.com/gfx-rs/gfx"
keywords = ["graphics", "gamedev"]
license = "Apache-2.0"
authors = ["The Gfx-rs Developers"]
documentation = "https://docs.rs/gfx_app"
readme = "README.md"
documentation = "https://docs.rs/gfx"
categories = ["rendering::graphics-api"]

[lib]
name = "gfx"
path = "src/render/src/lib.rs"

[workspace]

[features]
default = []
cgmath-types = ["gfx/cgmath-types", "gfx_core/cgmath-types"]
cgmath-types = ["gfx_core/cgmath-types", "cgmath"]
metal = ["gfx_device_metal", "gfx_window_metal", "gfx_device_metalll"]
vulkan = ["gfx_device_vulkan", "gfx_device_vulkanll", "gfx_window_vulkan"]
sdl = ["gfx_window_sdl"]
serialize = ["gfx/serialize", "gfx_core/serialize"]
serialize = ["gfx_core/serialize", "draw_state/serialize"]
headless = ["gfx_window_glutin/headless"]
unstable = []

[lib]
name = "gfx_app"

[dependencies]
cgmath = { version = "0.14", optional = true }
derivative = "1.0"
draw_state = "0.7"
log = "0.3"
env_logger = "0.4"
glutin = "0.8.0"
winit = "0.6.0"
gfx_core = { path = "src/core", version = "0.7.1" }
gfx_corell = { path = "src/corell", version = "0.1" }
gfx = { path = "src/render", version = "0.16" }
gfx_macros = { path = "src/macros", version = "0.2" }
gfx_device_gl = { path = "src/backend/gl", version = "0.14" }
gfx_window_glutin = { path = "src/window/glutin", version = "0.16" }

[dependencies.gfx_device_vulkan]
path = "src/backend/vulkan"
Expand Down Expand Up @@ -143,9 +158,19 @@ path = "examples/trianglell/main.rs"

[dev-dependencies]
cgmath = "0.14"
gfx_gl = "0.3"
rand = "0.3"
env_logger = "0.4"
genmesh = "0.4"
noise = "0.1"
gfx_gl = "0.3"
glutin = "0.8.0"
image = "0.13"
noise = "0.1"
rand = "0.3"
winit = "0.6"
gfx_app = { path = "src/gfx_app", version = "0.6" }
gfx_corell = { path = "src/corell", version = "0.1" }
gfx_device_gl = { path = "src/backend/gl", version = "0.14" }
gfx_macros = { path = "src/macros", version = "0.2" }
gfx_window_glutin = { path = "src/window/glutin", version = "0.16" }

[target.x86_64-unknown-linux-gnu.dev-dependencies]
glfw = "0.12"
4 changes: 2 additions & 2 deletions info/contrib.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Finally, feel free to hop on [#rust-gamedev](http://chat.mibbit.com/?server=irc.
* _examples_ : GFX's examples
* _tests_ : GFX's tests
* _info_ : Information and documentation
* _src_ : gfx_app, an application framework for GFX
* _src/gfx_app_ : gfx_app, an application framework for GFX
* _src/core_ : gfx_core, core structures and the interface that backends must provide
* _src/backend_ : The backends implementations
* _src/render_ : The main gfx package
* _src/window_ : Different backends to create windows and initialize their graphics

### Code

gfx-rs adheres to [Rust Coding Guidelines](http://aturon.github.io/).
gfx-rs adheres to [Rust Coding Guidelines](http://aturon.github.io/).
35 changes: 16 additions & 19 deletions src/render/Cargo.toml → src/gfx_app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 The Gfx-rs Developers.
# Copyright 2017 The Gfx-rs Developers.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,30 +13,27 @@
# limitations under the License.

[package]
name = "gfx"
version = "0.16.0"
description = "A high-performance, bindless graphics API"
name = "gfx_app"
version = "0.6.0"
description = "GFX example application framework"
homepage = "https://github.com/gfx-rs/gfx"
repository = "https://github.com/gfx-rs/gfx"
keywords = ["graphics", "gamedev"]
license = "Apache-2.0"
authors = ["The Gfx-rs Developers"]
readme = "../../README.md"
documentation = "https://docs.rs/gfx"
categories = ["rendering::graphics-api"]
documentation = "https://docs.rs/gfx_app"

[lib]
name = "gfx"
path = "src/lib.rs"

[features]
cgmath-types = ["gfx_core/cgmath-types", "cgmath"]
serialize = ["gfx_core/serialize", "draw_state/serialize"]
unstable = []
name = "gfx_app"
path ="src/lib.rs"

[dependencies]
cgmath = { version = "0.14", optional = true }
derivative = "1.0"
draw_state = "0.7"
gfx_core = { path = "../core", version = "0.7.1" }
log = "0.3"
env_logger = "0.4"
glutin = "0.8.0"
winit = "0.6"
gfx_core = { path = "../core", version = "0.7" }
gfx_corell = { path = "../corell", version = "0.1" }
gfx = { path = "../..", version = "0.16" }
gfx_macros = { path = "../macros", version = "0.2" }
gfx_device_gl = { path = "../backend/gl", version = "0.14" }
gfx_window_glutin = { path = "../window/glutin", version = "0.16" }
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/window/glfw/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ gfx_device_gl = { path = "../../backend/gl", version = "0.14" }
# Currently there is an issue with cargo and dev-dependencies:
# https://github.com/rust-lang/cargo/issues/860
# TODO: move gfx to [dev-dependencies] once it gets resolved.
gfx = { path = "../../render", version = "0.16" }
# gfx = { path = "../../render", version = "0.16" }
2 changes: 1 addition & 1 deletion src/window/sdl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ gfx_device_gl = { path = "../../backend/gl", version = "0.14" }
# Currently there is an issue with cargo and dev-dependencies:
# https://github.com/rust-lang/cargo/issues/860
# TODO: move gfx to [dev-dependencies] once it gets resolved.
gfx = { path = "../../render", version = "*" }
# gfx = { path = "../../render", version = "*" }

[[example]]
name = "window"
Expand Down