From 48d4d1a353f3ee0ac0f87036c9ae857cf5e6a051 Mon Sep 17 00:00:00 2001 From: Benjamin Hansen Date: Sat, 10 Jun 2023 14:21:33 -0600 Subject: [PATCH] pong and news --- Cargo.lock | 1215 +++++++++++------ Cargo.toml | 2 +- code/beginner/tutorial1-window/Cargo.toml | 8 +- code/beginner/tutorial2-surface/Cargo.toml | 6 +- code/beginner/tutorial3-pipeline/Cargo.toml | 6 +- code/beginner/tutorial4-buffer/Cargo.toml | 6 +- code/beginner/tutorial5-textures/Cargo.toml | 6 +- code/beginner/tutorial6-uniforms/Cargo.toml | 6 +- code/beginner/tutorial7-instancing/Cargo.toml | 6 +- code/beginner/tutorial8-depth/Cargo.toml | 6 +- code/beginner/tutorial9-models/Cargo.toml | 6 +- .../tutorial10-lighting/Cargo.toml | 6 +- .../tutorial11-normals/Cargo.toml | 6 +- .../intermediate/tutorial12-camera/Cargo.toml | 6 +- .../tutorial13-terrain/Cargo.toml | 6 +- code/showcase/compute/Cargo.toml | 4 +- code/showcase/framework/Cargo.toml | 4 +- code/showcase/gifs/Cargo.toml | 4 +- code/showcase/imgui-demo/Cargo.toml | 2 +- code/showcase/lost-window/Cargo.toml | 4 +- code/showcase/mouse-picking/Cargo.toml | 6 +- code/showcase/pong/Cargo.toml | 10 +- code/showcase/pong/build.rs | 14 +- code/showcase/pong/src/lib.rs | 18 +- code/showcase/pong/src/main.rs | 2 +- code/showcase/pong/src/render/buffer.rs | 13 +- code/showcase/pong/src/render/mod.rs | 7 +- code/showcase/pong/src/sound.rs | 9 +- code/showcase/threading/Cargo.toml | 6 +- code/showcase/windowless/Cargo.toml | 2 +- code/wasm-builder/Cargo.toml | 2 +- docs/beginner/tutorial1-window/README.md | 4 +- docs/beginner/tutorial2-surface/README.md | 8 +- docs/beginner/tutorial5-textures/README.md | 4 +- docs/news/0.16/readme.md | 45 + docs/showcase/pong/README.md | 8 +- docs/showcase/windowless/README.md | 2 +- wasm-targets.json | 4 + 38 files changed, 973 insertions(+), 506 deletions(-) create mode 100644 docs/news/0.16/readme.md diff --git a/Cargo.lock b/Cargo.lock index 4953f9a7..b96b5f06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5110f1c78cf582855d895ecd0746b653db010cec6d9f5575293f27934d980a39" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "addr2line" version = "0.19.0" @@ -41,6 +57,52 @@ dependencies = [ name = "alignment" version = "0.1.0" +[[package]] +name = "alsa" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5915f52fe2cf65e83924d037b6c5290b7cee097c6b5c8700746e6168a343fd6b" +dependencies = [ + "alsa-sys", + "bitflags 1.3.2", + "libc", + "nix 0.23.2", +] + +[[package]] +name = "alsa-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "android-activity" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk 0.7.0", + "ndk-context", + "ndk-sys 0.4.0", + "num_enum", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -75,16 +137,19 @@ dependencies = [ ] [[package]] -name = "arrayref" -version = "0.3.6" +name = "approx" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] [[package]] -name = "arrayvec" -version = "0.5.2" +name = "arrayref" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" @@ -229,6 +294,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + [[package]] name = "base64" version = "0.9.3" @@ -245,6 +316,26 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "bindgen" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 1.0.102", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -284,6 +375,25 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + [[package]] name = "blocking" version = "1.2.0" @@ -321,7 +431,7 @@ checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -349,7 +459,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" dependencies = [ "log", - "nix", + "nix 0.24.2", "slotmap", "thiserror", "vec_map", @@ -371,6 +481,24 @@ name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -378,13 +506,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "cgmath" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a98d30140e3296250832bbaaff83b27dcd6fa3cc70fb6f1f3e5c9c0023b5317" dependencies = [ - "approx", + "approx 0.4.0", "num-traits", ] @@ -401,43 +535,23 @@ dependencies = [ ] [[package]] -name = "cmake" -version = "0.1.48" +name = "clang-sys" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ - "cc", -] - -[[package]] -name = "cocoa" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types 0.3.2", + "glob", "libc", - "objc", + "libloading 0.7.3", ] [[package]] -name = "cocoa-foundation" -version = "0.1.0" +name = "cmake" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "foreign-types 0.3.2", - "libc", - "objc", + "cc", ] [[package]] @@ -462,6 +576,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "compute" version = "0.1.0" @@ -503,9 +627,9 @@ dependencies = [ [[package]] name = "console_log" -version = "0.2.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" +checksum = "be8aed40e4edbf4d3b4431ab260b63fdc40f5780a4766824329ea0f1eefe3c0f" dependencies = [ "log", "web-sys", @@ -536,7 +660,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "libc", ] @@ -548,20 +672,52 @@ checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags 1.3.2", "core-foundation", - "foreign-types 0.3.2", + "foreign-types", "libc", ] [[package]] -name = "core-text" -version = "19.2.0" +name = "coreaudio-rs" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" dependencies = [ - "core-foundation", - "core-graphics", - "foreign-types 0.3.2", + "bitflags 1.3.2", + "coreaudio-sys", +] + +[[package]] +name = "coreaudio-sys" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f034b2258e6c4ade2f73bf87b21047567fb913ee9550837c2316d139b0262b24" +dependencies = [ + "bindgen", +] + +[[package]] +name = "cpal" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f342c1b63e185e9953584ff2199726bf53850d96610a310e3aca09e9405a2d0b" +dependencies = [ + "alsa", + "core-foundation-sys", + "coreaudio-rs", + "jni", + "js-sys", "libc", + "mach", + "ndk 0.7.0", + "ndk-context", + "oboe", + "once_cell", + "parking_lot 0.12.1", + "stdweb", + "thiserror", + "wasm-bindgen", + "web-sys", + "windows 0.37.0", ] [[package]] @@ -616,29 +772,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossfont" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66b1c1979c4362323f03ab6bf7fb522902bfc418e0c37319ab347f9561d980f" -dependencies = [ - "cocoa", - "core-foundation", - "core-foundation-sys", - "core-graphics", - "core-text", - "dwrote", - "foreign-types 0.5.0", - "freetype-rs", - "libc", - "log", - "objc", - "once_cell", - "pkg-config", - "servo-fontconfig", - "winapi", -] - [[package]] name = "crunchy" version = "0.2.2" @@ -652,7 +785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -685,7 +818,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.102", ] [[package]] @@ -702,7 +835,7 @@ checksum = "dcb67a6de1f602736dd7eaead0080cf3435df806c61b24b13328db128c58868f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -716,47 +849,18 @@ dependencies = [ "winapi", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn", -] - [[package]] name = "devserver_lib" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fb4b71acc1405be2431a93892a79a0d82ed5ba6885649ddbdfc62caa4d67b1c" +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "dispatch" version = "0.2.0" @@ -778,20 +882,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" -[[package]] -name = "dwrote" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" -dependencies = [ - "lazy_static", - "libc", - "serde", - "serde_derive", - "winapi", - "wio", -] - [[package]] name = "either" version = "1.8.0" @@ -847,16 +937,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "expat-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" -dependencies = [ - "cmake", - "pkg-config", -] - [[package]] name = "exr" version = "1.5.2" @@ -922,28 +1002,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1", -] - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared 0.3.1", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "foreign-types-shared", ] [[package]] @@ -952,12 +1011,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - [[package]] name = "form_urlencoded" version = "1.1.0" @@ -989,28 +1042,6 @@ dependencies = [ "winit", ] -[[package]] -name = "freetype-rs" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" -dependencies = [ - "bitflags 1.3.2", - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - [[package]] name = "fs_extra" version = "1.2.0" @@ -1166,6 +1197,44 @@ dependencies = [ "web-sys", ] +[[package]] +name = "glyph_brush" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4edefd123f28a0b1d41ec4a489c2b43020b369180800977801611084f342978d" +dependencies = [ + "glyph_brush_draw_cache", + "glyph_brush_layout", + "ordered-float", + "rustc-hash", + "twox-hash", +] + +[[package]] +name = "glyph_brush_draw_cache" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6010675390f6889e09a21e2c8b575b3ee25667ea8237a8d59423f73cb8c28610" +dependencies = [ + "ab_glyph", + "crossbeam-channel", + "crossbeam-deque", + "linked-hash-map", + "rayon", + "rustc-hash", +] + +[[package]] +name = "glyph_brush_layout" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc32c2334f00ca5ac3695c5009ae35da21da8c62d255b5b96d56e2597a637a38" +dependencies = [ + "ab_glyph", + "approx 0.5.1", + "xi-unicode", +] + [[package]] name = "gpu-alloc" version = "0.5.3" @@ -1195,7 +1264,7 @@ dependencies = [ "log", "thiserror", "winapi", - "windows", + "windows 0.44.0", ] [[package]] @@ -1303,6 +1372,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" +[[package]] +name = "hound" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d13cdbd5dbb29f9c88095bbdc2590c9cba0d0a1269b983fef6b2cdd7e9f4db1" + [[package]] name = "http" version = "0.2.8" @@ -1410,12 +1485,6 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.3.0" @@ -1501,12 +1570,35 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + [[package]] name = "jni-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.2.6" @@ -1551,6 +1643,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "leb128" version = "0.2.5" @@ -1598,6 +1696,12 @@ dependencies = [ "cc", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -1634,6 +1738,15 @@ dependencies = [ "winit", ] +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -1660,9 +1773,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -1685,7 +1798,7 @@ dependencies = [ "bitflags 1.3.2", "block", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "log", "objc", ] @@ -1776,6 +1889,23 @@ dependencies = [ "thiserror", ] +[[package]] +name = "naga" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" +dependencies = [ + "bit-set", + "bitflags 1.3.2", + "indexmap", + "log", + "num-traits", + "pp-rs", + "rustc-hash", + "spirv", + "thiserror", +] + [[package]] name = "naga" version = "0.12.2" @@ -1824,6 +1954,19 @@ dependencies = [ "tempfile", ] +[[package]] +name = "ndk" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +dependencies = [ + "bitflags 1.3.2", + "jni-sys", + "ndk-sys 0.3.0", + "num_enum", + "thiserror", +] + [[package]] name = "ndk" version = "0.7.0" @@ -1832,9 +1975,9 @@ checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", - "ndk-sys", + "ndk-sys 0.4.0", "num_enum", - "raw-window-handle 0.5.0", + "raw-window-handle", "thiserror", ] @@ -1845,32 +1988,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] -name = "ndk-glue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" -dependencies = [ - "libc", - "log", - "ndk", - "ndk-context", - "ndk-macro", - "ndk-sys", - "once_cell", - "parking_lot 0.12.1", -] - -[[package]] -name = "ndk-macro" +name = "ndk-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" +checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", + "jni-sys", ] [[package]] @@ -1882,6 +2005,19 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "nix" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" +dependencies = [ + "bitflags 1.3.2", + "cc", + "cfg-if", + "libc", + "memoffset", +] + [[package]] name = "nix" version = "0.24.2" @@ -1904,6 +2040,17 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.102", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1962,7 +2109,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -1975,6 +2122,32 @@ dependencies = [ "objc_exception", ] +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + [[package]] name = "objc_exception" version = "0.1.2" @@ -1993,6 +2166,29 @@ dependencies = [ "memchr", ] +[[package]] +name = "oboe" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" +dependencies = [ + "jni", + "ndk 0.6.0", + "ndk-context", + "num-derive", + "num-traits", + "oboe-sys", +] + +[[package]] +name = "oboe-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3370abb7372ed744232c12954d920d1a40f1c4686de9e79e800021ef492294bd" +dependencies = [ + "cc", +] + [[package]] name = "once_cell" version = "1.15.0" @@ -2007,7 +2203,7 @@ checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" dependencies = [ "bitflags 1.3.2", "cfg-if", - "foreign-types 0.3.2", + "foreign-types", "libc", "once_cell", "openssl-macros", @@ -2022,7 +2218,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -2044,6 +2240,33 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "orbclient" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221d488cd70617f1bd599ed8ceb659df2147d9393717954d82a0f5e8032a6ab1" +dependencies = [ + "redox_syscall 0.3.5", +] + +[[package]] +name = "ordered-float" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc2dbde8f8a79f2102cc474ceb0ad68e3b80b85289ea62389b60e66777e4213" +dependencies = [ + "num-traits", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" +dependencies = [ + "ttf-parser", +] + [[package]] name = "parking" version = "2.0.0" @@ -2098,6 +2321,12 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "percent-encoding" version = "2.2.0" @@ -2137,7 +2366,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -2186,9 +2415,38 @@ dependencies = [ [[package]] name = "pollster" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + +[[package]] +name = "pong" +version = "0.1.0" +dependencies = [ + "anyhow", + "bytemuck", + "cfg-if", + "cgmath", + "console_error_panic_hook", + "console_log", + "env_logger", + "fs_extra", + "getrandom", + "glob", + "instant", + "log", + "naga 0.11.1", + "pollster", + "rand", + "rayon", + "rodio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu", + "wgpu_glyph", + "winit", +] [[package]] name = "pp-rs" @@ -2199,6 +2457,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + [[package]] name = "proc-macro-crate" version = "1.2.1" @@ -2212,9 +2476,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -2227,28 +2491,49 @@ checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" [[package]] name = "quote" -version = "1.0.21" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] [[package]] -name = "range-alloc" -version = "0.1.2" +name = "rand" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] [[package]] -name = "raw-window-handle" -version = "0.4.3" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "cty", + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", ] +[[package]] +name = "range-alloc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" + [[package]] name = "raw-window-handle" version = "0.5.0" @@ -2297,6 +2582,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "regex" version = "1.6.0" @@ -2375,6 +2669,16 @@ dependencies = [ "winreg", ] +[[package]] +name = "rodio" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb10b653d5ec0e9411a2e7d46e2c7f4046fd87d35b9955bd73ba4108d69072b5" +dependencies = [ + "cpal", + "hound", +] + [[package]] name = "roxmltree" version = "0.14.1" @@ -2403,6 +2707,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.36.6" @@ -2423,21 +2736,21 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" -[[package]] -name = "safe_arch" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" -dependencies = [ - "bytemuck", -] - [[package]] name = "safemem" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.20" @@ -2474,12 +2787,13 @@ checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] name = "sctk-adwaita" -version = "0.4.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" dependencies = [ - "crossfont", + "ab_glyph", "log", + "memmap2", "smithay-client-toolkit", "tiny-skia", ] @@ -2507,6 +2821,21 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serde" version = "1.0.145" @@ -2524,7 +2853,7 @@ checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -2551,25 +2880,19 @@ dependencies = [ ] [[package]] -name = "servo-fontconfig" -version = "0.5.1" +name = "sha1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" dependencies = [ - "libc", - "servo-fontconfig-sys", + "sha1_smol", ] [[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" +name = "sha1_smol" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "shaderc" @@ -2601,6 +2924,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + [[package]] name = "slab" version = "0.4.7" @@ -2637,7 +2966,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "nix", + "nix 0.24.2", "pkg-config", "wayland-client", "wayland-cursor", @@ -2688,10 +3017,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "strsim" -version = "0.10.0" +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn 1.0.102", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn 1.0.102", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" + +[[package]] +name = "strict-num" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] name = "syn" @@ -2704,6 +3082,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tempfile" version = "3.3.0" @@ -2744,7 +3133,7 @@ checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -2817,27 +3206,27 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec", "bytemuck", "cfg-if", "png", - "safe_arch", "tiny-skia-path", ] [[package]] name = "tiny-skia-path" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" dependencies = [ "arrayref", "bytemuck", + "strict-num", ] [[package]] @@ -2995,6 +3384,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "ttf-parser" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44dcf002ae3b32cd25400d6df128c5babec3927cd1eb7ce813cfff20eb6c3746" + [[package]] name = "tutorial1-window" version = "0.1.0" @@ -3285,6 +3680,17 @@ dependencies = [ "winit", ] +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "rand", + "static_assertions", +] + [[package]] name = "unicode-bidi" version = "0.3.8" @@ -3375,6 +3781,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "walrus" version = "0.19.0" @@ -3386,7 +3802,7 @@ dependencies = [ "leb128", "log", "walrus-macro", - "wasmparser 0.77.0", + "wasmparser", ] [[package]] @@ -3398,7 +3814,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.102", ] [[package]] @@ -3419,9 +3835,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3429,24 +3845,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.18", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d4780c659b883a19ddb7ced365db19f7f45cd182d832ee14de2b7ef52e88a9f" +checksum = "8315d6503415e5d44ff64f1ba34aefd8264c561df17e0f1c8eb8c96bde79c45e" dependencies = [ "anyhow", "base64 0.9.3", @@ -3462,16 +3878,13 @@ dependencies = [ "wasm-bindgen-threads-xform", "wasm-bindgen-wasm-conventions", "wasm-bindgen-wasm-interpreter", - "wit-text", - "wit-validator", - "wit-walrus", ] [[package]] name = "wasm-bindgen-externref-xform" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d154c3843bf3b635b602ad41b56f505f8f1a25f8a0133fca4bbd0918d74efdc" +checksum = "4522bf3be16c6274c87a5a2c5d2a62efa80253b025f8e813f9682d0d6a8a8fca" dependencies = [ "anyhow", "walrus", @@ -3491,9 +3904,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3501,22 +3914,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.18", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-multi-value-xform" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00a577fbd4be358ef8095432189b5c2e6b6e71f5081797c2032572f77d65d26" +checksum = "113256596776ebb4b243512d3711e73d5475eaeff373e1ae65427c66e5aa2073" dependencies = [ "anyhow", "walrus", @@ -3524,15 +3937,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-bindgen-threads-xform" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa93941bae037b7b4fac4ecfc132294b828036c5990a806d0e6fd9284297d94" +checksum = "89106aaf83a2b80464fc8f60a074a4575135b73a491e174f35bbeae6ff0d7ec6" dependencies = [ "anyhow", "walrus", @@ -3541,9 +3954,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-conventions" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f5de325048d945c90600fdf66b13521f3340d85971287775c36aa99c04466b" +checksum = "84e5ad27a7930400994cb40823d3d4a7ef235fac52d0c75ebd61fa40eba994a8" dependencies = [ "anyhow", "walrus", @@ -3551,9 +3964,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-interpreter" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f695df44962e3a107436282232a2daa185b8453c16be8ddfb637cd2601f31128" +checksum = "e69500063b7b20f3e9422d78c2b381dd192c7c4ebaef34d205332877cd78e0d3" dependencies = [ "anyhow", "log", @@ -3574,27 +3987,12 @@ dependencies = [ "wasm-bindgen-cli-support", ] -[[package]] -name = "wasmparser" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9" - [[package]] name = "wasmparser" version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b35c86d22e720a07d954ebbed772d01180501afe7d03d464f413bb5f8914a8d6" -[[package]] -name = "wast" -version = "21.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1844f66a2bc8526d71690104c0e78a8e59ffa1597b7245769d174ebb91deb5" -dependencies = [ - "leb128", -] - [[package]] name = "wayland-client" version = "0.29.5" @@ -3604,7 +4002,7 @@ dependencies = [ "bitflags 1.3.2", "downcast-rs", "libc", - "nix", + "nix 0.24.2", "scoped-tls", "wayland-commons", "wayland-scanner", @@ -3617,7 +4015,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" dependencies = [ - "nix", + "nix 0.24.2", "once_cell", "smallvec", "wayland-sys", @@ -3629,7 +4027,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ - "nix", + "nix 0.24.2", "wayland-client", "xcursor", ] @@ -3699,14 +4097,14 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3059ea4ddec41ca14f356833e2af65e7e38c0a8f91273867ed526fb9bafcca95" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "cfg-if", "js-sys", "log", "naga 0.12.2", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.5.0", + "raw-window-handle", "smallvec", "static_assertions", "wasm-bindgen", @@ -3723,7 +4121,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "bit-vec", "bitflags 2.3.1", "codespan-reporting", @@ -3731,7 +4129,7 @@ dependencies = [ "naga 0.12.2", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.5.0", + "raw-window-handle", "rustc-hash", "smallvec", "thiserror", @@ -3747,14 +4145,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74851c2c8e5d97652e74c241d41b0656b31c924a45dcdecde83975717362cfa4" dependencies = [ "android_system_properties", - "arrayvec 0.7.2", + "arrayvec", "ash", "bit-set", "bitflags 2.3.1", "block", "core-graphics-types", "d3d12", - "foreign-types 0.3.2", + "foreign-types", "glow", "gpu-alloc", "gpu-allocator", @@ -3771,7 +4169,7 @@ dependencies = [ "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle 0.5.0", + "raw-window-handle", "renderdoc-sys", "rustc-hash", "smallvec", @@ -3806,6 +4204,18 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wgpu_glyph" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb849776538364c4d7571aca9718e2cb5ab973bee3cf5e127b83eab7616e33f" +dependencies = [ + "bytemuck", + "glyph_brush", + "log", + "wgpu", +] + [[package]] name = "widestring" version = "1.0.2" @@ -3854,6 +4264,19 @@ dependencies = [ "wgpu", ] +[[package]] +name = "windows" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +dependencies = [ + "windows_aarch64_msvc 0.37.0", + "windows_i686_gnu 0.37.0", + "windows_i686_msvc 0.37.0", + "windows_x86_64_gnu 0.37.0", + "windows_x86_64_msvc 0.37.0", +] + [[package]] name = "windows" version = "0.44.0" @@ -3891,6 +4314,15 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3948,6 +4380,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -3966,6 +4404,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -3984,6 +4428,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4002,6 +4452,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4032,6 +4488,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4046,12 +4508,13 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winit" -version = "0.27.4" +version = "0.28.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f64802920c4c35d12a53dad5e0c55bbc3004d8dc4f2e4dd64ad02c5665d7aa" +checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" dependencies = [ + "android-activity", "bitflags 1.3.2", - "cocoa", + "cfg_aliases", "core-foundation", "core-graphics", "dispatch", @@ -4059,21 +4522,22 @@ dependencies = [ "libc", "log", "mio", - "ndk", - "ndk-glue", - "objc", + "ndk 0.7.0", + "objc2", "once_cell", - "parking_lot 0.12.1", + "orbclient", "percent-encoding", - "raw-window-handle 0.4.3", - "raw-window-handle 0.5.0", + "raw-window-handle", + "redox_syscall 0.3.5", "sctk-adwaita", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", + "wayland-commons", "wayland-protocols", + "wayland-scanner", "web-sys", - "windows-sys 0.36.1", + "windows-sys 0.45.0", "x11-dl", ] @@ -4086,79 +4550,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wio" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" -dependencies = [ - "winapi", -] - -[[package]] -name = "wit-parser" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5fd97866f4b9c8e1ed57bcf9446f3d0d8ba37e2dd01c3c612c046c053b06f7" -dependencies = [ - "anyhow", - "leb128", - "wit-schema-version", -] - -[[package]] -name = "wit-schema-version" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfee4a6a4716eefa0682e7a3b836152e894a3e4f34a9d6c2c3e1c94429bfe36a" - -[[package]] -name = "wit-text" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33358e95c77d660f1c7c07f4a93c2bd89768965e844e3c50730bb4b42658df5f" -dependencies = [ - "anyhow", - "wast", - "wit-writer", -] - -[[package]] -name = "wit-validator" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c11d93d925420e7872b226c4161849c32be38385ccab026b88df99d8ddc6ba6" -dependencies = [ - "anyhow", - "wasmparser 0.59.0", - "wit-parser", - "wit-schema-version", -] - -[[package]] -name = "wit-walrus" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad559e3e4c6404b2a6a675d44129d62a3836e3b951b90112fa1c5feb852757cd" -dependencies = [ - "anyhow", - "id-arena", - "walrus", - "wit-parser", - "wit-schema-version", - "wit-writer", -] - -[[package]] -name = "wit-writer" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ad01ba5e9cbcff799a0689e56a153776ea694cec777f605938cb9880d41a09" -dependencies = [ - "leb128", - "wit-schema-version", -] - [[package]] name = "x11-dl" version = "2.20.0" @@ -4179,6 +4570,12 @@ dependencies = [ "nom", ] +[[package]] +name = "xi-unicode" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" + [[package]] name = "xml-rs" version = "0.8.4" diff --git a/Cargo.toml b/Cargo.toml index 23f226cb..afbc30ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,5 +16,5 @@ members = [ ] exclude = [ "code/showcase/imgui-demo", - "code/showcase/pong", + #"code/showcase/pong", ] \ No newline at end of file diff --git a/code/beginner/tutorial1-window/Cargo.toml b/code/beginner/tutorial1-window/Cargo.toml index d113a45e..7458d837 100644 --- a/code/beginner/tutorial1-window/Cargo.toml +++ b/code/beginner/tutorial1-window/Cargo.toml @@ -13,17 +13,17 @@ path = "src/main.rs" [dependencies] cfg-if = "1" -winit = "0.27" +winit = "0.28" env_logger = "0.10" log = "0.4" wgpu = "0.16" -pollster = "0.2" +pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} -wasm-bindgen = "=0.2.84" +wasm-bindgen = "=0.2.86" wasm-bindgen-futures = "0.4.30" web-sys = { version = "0.3.53", features = [ "Document", diff --git a/code/beginner/tutorial2-surface/Cargo.toml b/code/beginner/tutorial2-surface/Cargo.toml index bf2cd661..308da1bd 100644 --- a/code/beginner/tutorial2-surface/Cargo.toml +++ b/code/beginner/tutorial2-surface/Cargo.toml @@ -9,15 +9,15 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" -winit = "0.27" +winit = "0.28" env_logger = "0.10" log = "0.4" wgpu = "0.16" -pollster = "0.2" +pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial3-pipeline/Cargo.toml b/code/beginner/tutorial3-pipeline/Cargo.toml index 8b29c9d0..d459a50d 100644 --- a/code/beginner/tutorial3-pipeline/Cargo.toml +++ b/code/beginner/tutorial3-pipeline/Cargo.toml @@ -9,15 +9,15 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" -winit = "0.27" +winit = "0.28" env_logger = "0.10" log = "0.4" wgpu = "0.16" -pollster = "0.2" +pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial4-buffer/Cargo.toml b/code/beginner/tutorial4-buffer/Cargo.toml index 1dafca30..4a96c911 100644 --- a/code/beginner/tutorial4-buffer/Cargo.toml +++ b/code/beginner/tutorial4-buffer/Cargo.toml @@ -10,17 +10,17 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" -winit = "0.27" +winit = "0.28" wgpu = "0.16" env_logger = "0.10" log = "0.4" -pollster = "0.2" +pollster = "0.3" # NEW! bytemuck = { version = "1.12", features = [ "derive" ] } [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial5-textures/Cargo.toml b/code/beginner/tutorial5-textures/Cargo.toml index 3e75e826..a407bd57 100644 --- a/code/beginner/tutorial5-textures/Cargo.toml +++ b/code/beginner/tutorial5-textures/Cargo.toml @@ -13,9 +13,9 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } env_logger = "0.10" log = "0.4" -pollster = "0.2" +pollster = "0.3" wgpu = "0.16" -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -24,7 +24,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial6-uniforms/Cargo.toml b/code/beginner/tutorial6-uniforms/Cargo.toml index 564b3ccf..f321deff 100644 --- a/code/beginner/tutorial6-uniforms/Cargo.toml +++ b/code/beginner/tutorial6-uniforms/Cargo.toml @@ -14,9 +14,9 @@ bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" log = "0.4" -pollster = "0.2" +pollster = "0.3" wgpu = "0.16" -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -25,7 +25,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial7-instancing/Cargo.toml b/code/beginner/tutorial7-instancing/Cargo.toml index 737a50a5..93bffc8f 100644 --- a/code/beginner/tutorial7-instancing/Cargo.toml +++ b/code/beginner/tutorial7-instancing/Cargo.toml @@ -14,9 +14,9 @@ bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" log = "0.4" -pollster = "0.2" +pollster = "0.3" wgpu = "0.16" -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -25,7 +25,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial8-depth/Cargo.toml b/code/beginner/tutorial8-depth/Cargo.toml index 8f3b63c1..319a80d5 100644 --- a/code/beginner/tutorial8-depth/Cargo.toml +++ b/code/beginner/tutorial8-depth/Cargo.toml @@ -13,10 +13,10 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" wgpu = "0.16" -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -25,7 +25,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/beginner/tutorial9-models/Cargo.toml b/code/beginner/tutorial9-models/Cargo.toml index 945ccc69..be852e17 100644 --- a/code/beginner/tutorial9-models/Cargo.toml +++ b/code/beginner/tutorial9-models/Cargo.toml @@ -13,11 +13,11 @@ bytemuck = { version = "1.12", features = [ "derive" ] } cfg-if = "1" cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} wgpu = "0.16" -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -27,7 +27,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/intermediate/tutorial10-lighting/Cargo.toml b/code/intermediate/tutorial10-lighting/Cargo.toml index 7167d0aa..2d62e7d6 100644 --- a/code/intermediate/tutorial10-lighting/Cargo.toml +++ b/code/intermediate/tutorial10-lighting/Cargo.toml @@ -13,11 +13,11 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} wgpu = { version = "0.16"} -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -27,7 +27,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/intermediate/tutorial11-normals/Cargo.toml b/code/intermediate/tutorial11-normals/Cargo.toml index aaf4f732..010b3b8e 100644 --- a/code/intermediate/tutorial11-normals/Cargo.toml +++ b/code/intermediate/tutorial11-normals/Cargo.toml @@ -13,11 +13,11 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} wgpu = { version = "0.16"} -winit = "0.27" +winit = "0.28" [dependencies.image] version = "0.24" @@ -27,7 +27,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/intermediate/tutorial12-camera/Cargo.toml b/code/intermediate/tutorial12-camera/Cargo.toml index 21db8b57..1bfde49b 100644 --- a/code/intermediate/tutorial12-camera/Cargo.toml +++ b/code/intermediate/tutorial12-camera/Cargo.toml @@ -13,11 +13,11 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} wgpu = { version = "0.16"} -winit = "0.27" +winit = "0.28" instant = "0.1" [dependencies.image] @@ -28,7 +28,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/intermediate/tutorial13-terrain/Cargo.toml b/code/intermediate/tutorial13-terrain/Cargo.toml index 7062505c..a25c7fc5 100644 --- a/code/intermediate/tutorial13-terrain/Cargo.toml +++ b/code/intermediate/tutorial13-terrain/Cargo.toml @@ -13,11 +13,11 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = { version = "0.18", features = [ "swizzle" ] } env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} wgpu = { version = "0.16"} -winit = "0.27" +winit = "0.28" instant = "0.1" [dependencies.image] @@ -28,7 +28,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/showcase/compute/Cargo.toml b/code/showcase/compute/Cargo.toml index 916180e5..e356b963 100644 --- a/code/showcase/compute/Cargo.toml +++ b/code/showcase/compute/Cargo.toml @@ -9,13 +9,13 @@ anyhow = "1.0" bytemuck = { version = "1.4", features = ["derive"]} cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" image = "0.24" log = "0.4" rayon = "1.4" tobj = "2.0" wgpu = "0.16" -winit = "0.27" +winit = "0.28" [build-dependencies] anyhow = "1.0" diff --git a/code/showcase/framework/Cargo.toml b/code/showcase/framework/Cargo.toml index 5fe1eb15..7b578bfe 100644 --- a/code/showcase/framework/Cargo.toml +++ b/code/showcase/framework/Cargo.toml @@ -10,13 +10,13 @@ thiserror = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" image = "0.24.2" log = "0.4" tobj = "2.0" wgpu = "0.16" wgpu-subscriber = "0.1" -winit = "0.27" +winit = "0.28" [build-dependencies] anyhow = "1.0" diff --git a/code/showcase/gifs/Cargo.toml b/code/showcase/gifs/Cargo.toml index e4bebee3..5fd02b03 100644 --- a/code/showcase/gifs/Cargo.toml +++ b/code/showcase/gifs/Cargo.toml @@ -10,12 +10,12 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" image = "0.24.2" log = "0.4" tobj = "3.1" wgpu = "0.16" -winit = "0.27" +winit = "0.28" gif = "0.11.4" futures-intrusive = "0.4" diff --git a/code/showcase/imgui-demo/Cargo.toml b/code/showcase/imgui-demo/Cargo.toml index f3e07a7b..a99355bf 100644 --- a/code/showcase/imgui-demo/Cargo.toml +++ b/code/showcase/imgui-demo/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] anyhow = "1.0" wgpu = "0.16" -pollster = "0.2" +pollster = "0.3" imgui = "0.7" imgui-wgpu = "0.17" imgui-winit-support = "0.7" diff --git a/code/showcase/lost-window/Cargo.toml b/code/showcase/lost-window/Cargo.toml index 888bedb8..5aed5862 100644 --- a/code/showcase/lost-window/Cargo.toml +++ b/code/showcase/lost-window/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] anyhow = "1" wgpu = "0.16" -winit = "0.27" -pollster = "0.2" \ No newline at end of file +winit = "0.28" +pollster = "0.3" \ No newline at end of file diff --git a/code/showcase/mouse-picking/Cargo.toml b/code/showcase/mouse-picking/Cargo.toml index e5356df0..135342ab 100644 --- a/code/showcase/mouse-picking/Cargo.toml +++ b/code/showcase/mouse-picking/Cargo.toml @@ -13,11 +13,11 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} wgpu = { version = "0.16"} -winit = "0.27" +winit = "0.28" instant = "0.1" [dependencies.image] @@ -28,7 +28,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/showcase/pong/Cargo.toml b/code/showcase/pong/Cargo.toml index 3fe6c9b5..2cdadb07 100644 --- a/code/showcase/pong/Cargo.toml +++ b/code/showcase/pong/Cargo.toml @@ -10,13 +10,13 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" env_logger = "0.10" -winit = "0.27" +winit = "0.28" anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" -pollster = "0.2" +pollster = "0.3" wgpu = { version = "0.16", features = ["spirv"]} -wgpu_glyph = "0.18" +wgpu_glyph = "0.20" rand = "0.8" rodio = { version = "0.16", default-features = false, features = ["wav"] } log = "0.4" @@ -24,11 +24,11 @@ instant = "0.1" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" getrandom = { version = "0.2", features = ["js"] } rodio = { version = "0.16", default-features = false, features = ["wasm-bindgen", "wav"] } wasm-bindgen-futures = "0.4.20" -wasm-bindgen = "=0.2.84" +wasm-bindgen = "=0.2.86" web-sys = { version = "0.3.53", features = [ "Document", "Window", diff --git a/code/showcase/pong/build.rs b/code/showcase/pong/build.rs index c4a809cd..935b7e4e 100644 --- a/code/showcase/pong/build.rs +++ b/code/showcase/pong/build.rs @@ -1,4 +1,4 @@ -use anyhow::{Context, bail, Result}; +use anyhow::{bail, Context, Result}; use fs_extra::copy_items; use fs_extra::dir::CopyOptions; use glob::glob; @@ -40,12 +40,12 @@ pub fn load_shader(src_path: PathBuf) -> anyhow::Result<()> { }; let flags = naga::valid::ValidationFlags::all(); - let info = naga::valid::Validator::new( - flags, - naga::valid::Capabilities::empty(), - ) - .validate(&module)?; - std::fs::write(wgsl_path, wgsl::write_string(&module, &info, wgsl::WriterFlags::all())?)?; + let info = + naga::valid::Validator::new(flags, naga::valid::Capabilities::empty()).validate(&module)?; + std::fs::write( + wgsl_path, + wgsl::write_string(&module, &info, wgsl::WriterFlags::all())?, + )?; Ok(()) } diff --git a/code/showcase/pong/src/lib.rs b/code/showcase/pong/src/lib.rs index ab406b33..98d582a7 100644 --- a/code/showcase/pong/src/lib.rs +++ b/code/showcase/pong/src/lib.rs @@ -8,7 +8,7 @@ mod util; use input::Input; use system::System; -#[cfg(target_arch="wasm32")] +#[cfg(target_arch = "wasm32")] use wasm_bindgen::prelude::*; use winit::dpi::PhysicalSize; @@ -16,7 +16,7 @@ use winit::event::*; use winit::event_loop::{ControlFlow, EventLoop}; use winit::window::{Fullscreen, WindowBuilder}; -#[cfg_attr(target_arch="wasm32", wasm_bindgen(start))] +#[cfg_attr(target_arch = "wasm32", wasm_bindgen(start))] pub fn start() { cfg_if::cfg_if! { if #[cfg(target_arch = "wasm32")] { @@ -30,7 +30,9 @@ pub fn start() { let event_loop = EventLoop::new(); let monitor = event_loop.primary_monitor().unwrap(); let video_mode = monitor.video_modes().next(); - let size = video_mode.clone().map_or(PhysicalSize::new(800, 600), |vm| vm.size()); + let size = video_mode + .clone() + .map_or(PhysicalSize::new(800, 600), |vm| vm.size()); let window = WindowBuilder::new() .with_visible(false) .with_title("Pong") @@ -56,8 +58,8 @@ pub fn start() { // Request fullscreen, if denied, continue as normal match canvas.request_fullscreen() { - Ok(_) => {}, - Err(_) => () + Ok(_) => {} + Err(_) => (), } Some(()) @@ -193,11 +195,15 @@ pub fn start() { } } Event::WindowEvent { - event: WindowEvent::Resized(size), .. + event: WindowEvent::Resized(size), + .. } => { render.resize(size); events.push(state::Event::Resize(size.width as f32, size.height as f32)); } + Event::RedrawEventsCleared => { + window.request_redraw(); + } Event::RedrawRequested(window_id) if window_id == window.id() => { for event in &events { match event { diff --git a/code/showcase/pong/src/main.rs b/code/showcase/pong/src/main.rs index 879ae810..217e6a04 100644 --- a/code/showcase/pong/src/main.rs +++ b/code/showcase/pong/src/main.rs @@ -1,3 +1,3 @@ fn main() { pong::start(); -} \ No newline at end of file +} diff --git a/code/showcase/pong/src/render/buffer.rs b/code/showcase/pong/src/render/buffer.rs index 36889043..681be424 100644 --- a/code/showcase/pong/src/render/buffer.rs +++ b/code/showcase/pong/src/render/buffer.rs @@ -107,11 +107,20 @@ pub struct StagingBuffer { } impl StagingBuffer { - pub fn new(device: &wgpu::Device, data: &[T], is_index_buffer: bool) -> StagingBuffer { + pub fn new( + device: &wgpu::Device, + data: &[T], + is_index_buffer: bool, + ) -> StagingBuffer { StagingBuffer { buffer: device.create_buffer_init(&BufferInitDescriptor { contents: bytemuck::cast_slice(data), - usage: wgpu::BufferUsages::COPY_SRC | if is_index_buffer { wgpu::BufferUsages::INDEX } else { wgpu::BufferUsages::empty() }, + usage: wgpu::BufferUsages::COPY_SRC + | if is_index_buffer { + wgpu::BufferUsages::INDEX + } else { + wgpu::BufferUsages::empty() + }, label: Some("Staging Buffer"), }), size: size_of_slice(data) as wgpu::BufferAddress, diff --git a/code/showcase/pong/src/render/mod.rs b/code/showcase/pong/src/render/mod.rs index d5a72042..077155c8 100644 --- a/code/showcase/pong/src/render/mod.rs +++ b/code/showcase/pong/src/render/mod.rs @@ -44,7 +44,7 @@ impl Render { backends: wgpu::Backends::all(), dx12_shader_compiler: Default::default(), }); - + // # Safety // // The surface needs to live as long as the window that created it. @@ -75,7 +75,9 @@ impl Render { // Shader code in this tutorial assumes an Srgb surface texture. Using a different // one will result all the colors comming out darker. If you want to support non // Srgb surfaces, you'll need to account for that when drawing to the frame. - let surface_format = surface_caps.formats.iter() + let surface_format = surface_caps + .formats + .iter() .copied() .find(|f| f.is_srgb()) .unwrap_or(surface_caps.formats[0]); @@ -218,7 +220,6 @@ impl Render { self.staging_belt.finish(); self.queue.submit(iter::once(encoder.finish())); frame.present(); - } Err(wgpu::SurfaceError::Outdated) => { log::info!("Outdated surface texture"); diff --git a/code/showcase/pong/src/sound.rs b/code/showcase/pong/src/sound.rs index 6e17feb1..6cb8247d 100644 --- a/code/showcase/pong/src/sound.rs +++ b/code/showcase/pong/src/sound.rs @@ -17,8 +17,13 @@ impl SoundSystem { let sink = rodio::Sink::try_new(&stream_handle).unwrap(); sink.set_volume(0.5); - let spatial_sink = - rodio::SpatialSink::try_new(&stream_handle, [0.0, 0.0, 0.0], [-1.0, 0.0, 0.0], [1.0, 0.0, 0.0]).unwrap(); + let spatial_sink = rodio::SpatialSink::try_new( + &stream_handle, + [0.0, 0.0, 0.0], + [-1.0, 0.0, 0.0], + [1.0, 0.0, 0.0], + ) + .unwrap(); Self { stream, diff --git a/code/showcase/threading/Cargo.toml b/code/showcase/threading/Cargo.toml index 8bbf7133..bf4fdb6d 100644 --- a/code/showcase/threading/Cargo.toml +++ b/code/showcase/threading/Cargo.toml @@ -13,12 +13,12 @@ anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" env_logger = "0.10" -pollster = "0.2" +pollster = "0.3" log = "0.4" rayon = "1.4" # NEW! tobj = { version = "3.2", features = ["async"]} wgpu = { version = "0.16"} -winit = "0.27" +winit = "0.28" instant = "0.1" async-std = "1" @@ -30,7 +30,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" -console_log = "0.2" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/code/showcase/windowless/Cargo.toml b/code/showcase/windowless/Cargo.toml index be8b6a89..d988db25 100644 --- a/code/showcase/windowless/Cargo.toml +++ b/code/showcase/windowless/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" image = "0.24" shaderc = "0.8" wgpu = { version = "0.16", features = ["spirv"] } -pollster = "0.2" +pollster = "0.3" futures-intrusive = "0.4" [[bin]] diff --git a/code/wasm-builder/Cargo.toml b/code/wasm-builder/Cargo.toml index f48b89e0..f06367f0 100644 --- a/code/wasm-builder/Cargo.toml +++ b/code/wasm-builder/Cargo.toml @@ -12,4 +12,4 @@ env_logger = "0.10" rayon = "1" serde = { version = "1", features = ["derive"]} serde_json = "1" -wasm-bindgen-cli-support = "0.2.84" \ No newline at end of file +wasm-bindgen-cli-support = "0.2.86" \ No newline at end of file diff --git a/docs/beginner/tutorial1-window/README.md b/docs/beginner/tutorial1-window/README.md index f3c38357..059b6541 100644 --- a/docs/beginner/tutorial1-window/README.md +++ b/docs/beginner/tutorial1-window/README.md @@ -8,7 +8,7 @@ For the beginner stuff, we're going to keep things very simple, we'll add things ```toml [dependencies] -winit = "0.27" +winit = "0.28" env_logger = "0.10" log = "0.4" wgpu = "0.16" @@ -109,7 +109,7 @@ cfg-if = "1" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4.30" diff --git a/docs/beginner/tutorial2-surface/README.md b/docs/beginner/tutorial2-surface/README.md index c279409f..fe25add1 100644 --- a/docs/beginner/tutorial2-surface/README.md +++ b/docs/beginner/tutorial2-surface/README.md @@ -236,7 +236,7 @@ Now that `run()` is async, `main()` will need some way to await the future. We c ```toml [dependencies] # other deps... -pollster = "0.2" +pollster = "0.3" ``` We then use the `block_on` function provided by pollster to await our future: @@ -258,15 +258,15 @@ If we try to build WASM now it will fail because `wasm-bindgen` doesn't support ```toml [dependencies] cfg-if = "1" -winit = "0.27" +winit = "0.28" env_logger = "0.10" log = "0.4" wgpu = "0.16" -pollster = "0.2" +pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" wgpu = { version = "0.16", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/docs/beginner/tutorial5-textures/README.md b/docs/beginner/tutorial5-textures/README.md index 0ec873a5..c0bdf72a 100644 --- a/docs/beginner/tutorial5-textures/README.md +++ b/docs/beginner/tutorial5-textures/README.md @@ -446,10 +446,10 @@ For convenience, let's pull our texture code into its own module. We'll first ne [dependencies] image = "0.23" cgmath = "0.18" -winit = "0.27" +winit = "0.28" env_logger = "0.10" log = "0.4" -pollster = "0.2" +pollster = "0.3" wgpu = "0.16" bytemuck = { version = "1.12", features = [ "derive" ] } anyhow = "1.0" # NEW! diff --git a/docs/news/0.16/readme.md b/docs/news/0.16/readme.md new file mode 100644 index 00000000..373894f0 --- /dev/null +++ b/docs/news/0.16/readme.md @@ -0,0 +1,45 @@ +# Update to 0.16 + +Very few changes here! We no longer need to use `NonZeroU32` and the like, instead it will be an `Option`. This is mostly used in dealing with textures. + +```rust +queue.write_texture( + wgpu::ImageCopyTexture { + aspect: wgpu::TextureAspect::All, + texture: &texture, + mip_level: 0, + origin: wgpu::Origin3d::ZERO, + }, + &rgba, + wgpu::ImageDataLayout { + offset: 0, + // bytes_per_row: NonZeroU32::new(4 * dimensions.0), + bytes_per_row: Some(4 * dimensions.0), + // rows_per_image: NonZeroU32::new(dimensions.1), + rows_per_image: Some(dimensions.1), + }, + size, +); +``` + +In other news WebGPU has been added to Chrome 113 and up! Currently the Linux version of Chrome beta isn't working and while it's working in Firefox, I'm going to hold off on switching to using that instead of the WebGL compatibility mode. If you mess around with WebGPU in browser check to see if your browser is supported and then remove the extra `wgpu` line from the `[target.'cfg(target_arch = "wasm32")'.dependencies]` section of `Cargo.toml`: + +```toml +[target.'cfg(target_arch = "wasm32")'.dependencies] +reqwest = { version = "0.11" } +console_error_panic_hook = "0.1" +console_log = "1.0" +# wgpu = { version = "0.16", features = ["webgl"]} +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +web-sys = { version = "0.3", features = [ + "Document", + "Window", + "Element", + "Location", +]} +``` + +No other changes need to be made to switch to using WebGPU in browser, so once the WebGPU samples at work in Chrome on Linux, I'll look into removing the `webgl` feature. + +That's all! As always let me know if I missed anything! \ No newline at end of file diff --git a/docs/showcase/pong/README.md b/docs/showcase/pong/README.md index 2cd3d21d..c1f86f90 100644 --- a/docs/showcase/pong/README.md +++ b/docs/showcase/pong/README.md @@ -269,11 +269,11 @@ In order for wasm-pack to work properly I first needed to add some dependencies: ```toml[dependencies] cfg-if = "1" env_logger = "0.10" -winit = "0.27" +winit = "0.28" anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" -pollster = "0.2" +pollster = "0.3" wgpu = { version = "0.16", features = ["spirv"]} wgpu_glyph = "0.17" rand = "0.8" @@ -283,11 +283,11 @@ instant = "0.1" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" -console_log = "0.2.0" +console_log = "1.0" getrandom = { version = "0.2", features = ["js"] } rodio = { version = "0.15", default-features = false, features = ["wasm-bindgen", "wav"] } wasm-bindgen-futures = "0.4.20" -wasm-bindgen = "=0.2.84" +wasm-bindgen = "=0.2.86" web-sys = { version = "0.3.53", features = [ "Document", "Window", diff --git a/docs/showcase/windowless/README.md b/docs/showcase/windowless/README.md index fd7361e6..c94a19d8 100644 --- a/docs/showcase/windowless/README.md +++ b/docs/showcase/windowless/README.md @@ -101,7 +101,7 @@ Update dependencies to support SPIR-V module. image = "0.23" shaderc = "0.7" wgpu = { version = "0.16", features = ["spirv"] } -pollster = "0.2" +pollster = "0.3" ``` Using that we'll create a simple `RenderPipeline`. diff --git a/wasm-targets.json b/wasm-targets.json index 3260fcc4..f10cf240 100644 --- a/wasm-targets.json +++ b/wasm-targets.json @@ -46,5 +46,9 @@ { "package": "tutorial12-camera", "out": "docs/.vuepress/components/wasm/tutorial12_camera" + }, + { + "package": "pong", + "out": "docs/.vuepress/components/wasm/pong" } ] \ No newline at end of file