Skip to content

Commit

Permalink
Use cargo 1.64 workspace inheritance feature
Browse files Browse the repository at this point in the history
  • Loading branch information
jinleili committed Oct 17, 2022
1 parent a0831b8 commit 8a0672b
Show file tree
Hide file tree
Showing 31 changed files with 431 additions and 467 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches: [ master ]
env:
RUST_VERSION: 1.64
CARGO_TERM_COLOR: always
jobs:
build:
Expand Down
132 changes: 12 additions & 120 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 40 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,46 @@ members = [
# showcase
"code/showcase/*",

"run-wasm",
"run-wasm"
]
exclude = [
"code/showcase/imgui-demo",
"code/showcase/imgui-demo"
# "code/showcase/pong",
]
]

[workspace.package]
edition = "2021"
rust-version = "1.64"

[workspace.dependencies.image]
version = "0.24"
default-features = false

[workspace.dependencies]
app-surface = { git = "/~https://github.com/jinleili/wgpu-on-app", tag = "0.1.2" }
bytemuck = "1.4"
cfg-if = "1"
cgmath = "0.18"
env_logger = "0.9"
futures-intrusive = "0.4"
instant = "0.1"
log = "0.4"
naga = { version = "0.10" }
pollster = "0.2"
rayon = "1.4"
tobj = "3.2"
winit = "0.27.1"
wgpu = "0.14"

# wasm32 dependencies
console_error_panic_hook = "0.1.6"
console_log = "0.2.0"
reqwest = { version = "0.11" }
wasm-bindgen = "0.2.83"
wasm-bindgen-futures = "0.4.30"
web-sys = "0.3.60"

# build-dependencies
anyhow = "1.0"
fs_extra = "1.2"
glob = "0.3"
27 changes: 14 additions & 13 deletions code/beginner/tutorial1-window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "tutorial1-window"
version = "0.1.0"
authors = ["Ben Hansen <bhbenjaminhansen@gmail.com>"]
edition = "2018"
edition.workspace = true
rust-version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]
Expand All @@ -12,20 +13,20 @@ name = "tutorial1-window"
path = "src/main.rs"

[dependencies]
cfg-if = "1"
winit = "0.27.1"
env_logger = "0.9"
log = "0.4"
wgpu = "0.14"
pollster = "0.2"
cfg-if.workspace = true
winit.workspace = true
env_logger.workspace = true
log.workspace = true
wgpu.workspace = true
pollster.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "0.2.0"
wgpu = { version = "0.14", features = ["webgl"] }
wasm-bindgen = "0.2.83"
wasm-bindgen-futures = "0.4.30"
web-sys = { version = "0.3.60", features = [
console_error_panic_hook.workspace = true
console_log.workspace = true
wgpu = { workspace = true, features = ["webgl"] }
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-sys = { workspace = true, features = [
"Document",
"Window",
"Element"
Expand Down
Loading

0 comments on commit 8a0672b

Please sign in to comment.