9: Restructure the repo to host multiple crates r=grovesNL a=kvark

As a follow-up, I'll rename this repository to just `wgpu`.

Co-authored-by: Dzmitry Malyshau <kvark@mozilla.com>
This commit is contained in:
bors[bot] 2018-09-19 01:57:51 +00:00
commit 99edaa256f
21 changed files with 56 additions and 49 deletions

26
Cargo.lock generated
View File

@ -298,19 +298,6 @@ dependencies = [
"relevant 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gpu-native"
version = "0.1.0"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx-backend-dx12 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-backend-empty 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-backend-metal 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-backend-vulkan 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-memory 0.1.0 (git+https://github.com/gfx-rs/gfx-memory?rev=483d64d)",
]
[[package]]
name = "itertools"
version = "0.5.10"
@ -727,6 +714,19 @@ dependencies = [
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wgpu-native"
version = "0.1.0"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx-backend-dx12 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-backend-empty 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-backend-metal 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-backend-vulkan 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx?rev=a435a05)",
"gfx-memory 0.1.0 (git+https://github.com/gfx-rs/gfx-memory?rev=483d64d)",
]
[[package]]
name = "winapi"
version = "0.3.5"

View File

@ -1,16 +1,4 @@
[package]
name = "gpu-native"
version = "0.1.0"
authors = ["Dzmitry Malyshau <kvark@mozilla.com>"]
[features]
default = []
[dependencies]
bitflags = "1.0"
gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05" } # required by gfx-memory
gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05" }
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05", optional = true }
gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05", optional = true }
gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05", optional = true }
gfx-memory = { git = "https://github.com/gfx-rs/gfx-memory", rev = "483d64d" }
[workspace]
members = [
"wgpu-native",
]

View File

@ -1,4 +1,4 @@
# WebGPU-native
# WebGPU
[![Build Status](https://travis-ci.org/gfx-rs/wgpu-native.svg)](https://travis-ci.org/gfx-rs/wgpu-native)
[![Gitter](https://badges.gitter.im/gfx-rs/gfx.svg)](https://gitter.im/gfx-rs/gfx)

View File

@ -1,19 +0,0 @@
extern crate gpu_native as gn;
fn main() {
let instance = gn::create_instance();
let adapter = gn::instance_get_adapter(instance, gn::AdapterDescriptor {
power_preference: gn::PowerPreference::LowPower,
});
let device = gn::adapter_create_device(adapter, gn::DeviceDescriptor {
extensions: gn::Extensions {
anisotropic_filtering: false,
},
});
let _vs = gn::device_create_shader_module(device, gn::ShaderModuleDescriptor {
code: include_bytes!("./data/hello_triangle.vert.spv"),
});
let _fs = gn::device_create_shader_module(device, gn::ShaderModuleDescriptor {
code: include_bytes!("./data/hello_triangle.frag.spv"),
});
}

19
wgpu-native/Cargo.toml Normal file
View File

@ -0,0 +1,19 @@
[package]
name = "wgpu-native"
version = "0.1.0"
authors = [
"Dzmitry Malyshau <kvark@mozilla.com>",
"Joshua Groves <josh@joshgroves.com>",
]
[features]
default = []
[dependencies]
bitflags = "1.0"
gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05" } # required by gfx-memory
gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05" }
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05", optional = true }
gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05", optional = true }
gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "a435a05", optional = true }
gfx-memory = { git = "https://github.com/gfx-rs/gfx-memory", rev = "483d64d" }

View File

@ -0,0 +1,19 @@
extern crate wgpu_native as wgn;
fn main() {
let instance = wgn::create_instance();
let adapter = wgn::instance_get_adapter(instance, wgn::AdapterDescriptor {
power_preference: wgn::PowerPreference::LowPower,
});
let device = wgn::adapter_create_device(adapter, wgn::DeviceDescriptor {
extensions: wgn::Extensions {
anisotropic_filtering: false,
},
});
let _vs = wgn::device_create_shader_module(device, wgn::ShaderModuleDescriptor {
code: include_bytes!("./data/hello_triangle.vert.spv"),
});
let _fs = wgn::device_create_shader_module(device, wgn::ShaderModuleDescriptor {
code: include_bytes!("./data/hello_triangle.frag.spv"),
});
}