diff --git a/Cargo.lock b/Cargo.lock
index 030f2ab..51ccbc8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -30,13 +30,10 @@ dependencies = [
]
[[package]]
-name = "aho-corasick"
-version = "1.1.2"
+name = "aligned-vec"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
-dependencies = [
- "memchr",
-]
+checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
[[package]]
name = "allocator-api2"
@@ -44,12 +41,6 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
-[[package]]
-name = "android-tzdata"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
-
[[package]]
name = "android_system_properties"
version = "0.1.5"
@@ -60,51 +51,26 @@ dependencies = [
]
[[package]]
-name = "anstream"
-version = "0.6.7"
+name = "anyhow"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba"
-dependencies = [
- "anstyle",
- "anstyle-parse",
- "anstyle-query",
- "anstyle-wincon",
- "colorchoice",
- "utf8parse",
-]
+checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
[[package]]
-name = "anstyle"
-version = "1.0.4"
+name = "arbitrary"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
+checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
[[package]]
-name = "anstyle-parse"
-version = "0.2.3"
+name = "arg_enum_proc_macro"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
+checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle-query"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
-dependencies = [
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "anstyle-wincon"
-version = "3.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
-dependencies = [
- "anstyle",
- "windows-sys 0.52.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
]
[[package]]
@@ -129,10 +95,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
-name = "backtrace"
-version = "0.3.69"
+name = "av1-grain"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
+dependencies = [
+ "anyhow",
+ "arrayvec",
+ "log",
+ "nom",
+ "num-rational",
+ "v_frame",
+]
+
+[[package]]
+name = "avif-serialize"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2"
+dependencies = [
+ "arrayvec",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.71"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
dependencies = [
"addr2line",
"cc",
@@ -176,12 +165,24 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+[[package]]
+name = "bitstream-io"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06c9989a51171e2e81038ab168b6ae22886fe9ded214430dbb4f41c28cf176da"
+
[[package]]
name = "block"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+[[package]]
+name = "built"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41bfbdb21256b87a8b5e80fab81a8eed158178e812fd7ba451907518b2742f16"
+
[[package]]
name = "bumpalo"
version = "3.14.0"
@@ -205,7 +206,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
]
[[package]]
@@ -215,12 +216,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
-name = "cc"
-version = "1.0.83"
+name = "byteorder-lite"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
+
+[[package]]
+name = "bytes"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
+
+[[package]]
+name = "cc"
+version = "1.0.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b"
dependencies = [
+ "jobserver",
"libc",
+ "once_cell",
+]
+
+[[package]]
+name = "cfg-expr"
+version = "0.15.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
]
[[package]]
@@ -230,56 +255,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "chrono"
-version = "0.4.31"
+name = "cfg_aliases"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
-dependencies = [
- "android-tzdata",
- "iana-time-zone",
- "num-traits",
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "clap"
-version = "4.4.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58e54881c004cec7895b0068a0a954cd5d62da01aef83fa35b1e594497bf5445"
-dependencies = [
- "clap_builder",
- "clap_derive",
-]
-
-[[package]]
-name = "clap_builder"
-version = "4.4.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59cb82d7f531603d2fd1f507441cdd35184fa81beff7bd489570de7f773460bb"
-dependencies = [
- "anstream",
- "anstyle",
- "clap_lex",
- "strsim",
-]
-
-[[package]]
-name = "clap_derive"
-version = "4.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "clap_lex"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
+checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
[[package]]
name = "codespan-reporting"
@@ -298,28 +277,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]
-name = "colorchoice"
-version = "1.0.0"
+name = "com"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
-
-[[package]]
-name = "com-rs"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642"
-
-[[package]]
-name = "console"
-version = "0.15.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
+checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6"
dependencies = [
- "encode_unicode",
- "lazy_static",
- "libc",
- "unicode-width",
- "windows-sys 0.52.0",
+ "com_macros",
+]
+
+[[package]]
+name = "com_macros"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5"
+dependencies = [
+ "com_macros_support",
+ "proc-macro2",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "com_macros_support"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
]
[[package]]
@@ -391,9 +376,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "d3d12"
-version = "0.7.0"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20"
+checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307"
dependencies = [
"bitflags 2.4.1",
"libloading 0.8.1",
@@ -406,28 +391,12 @@ version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
-[[package]]
-name = "encode_unicode"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
-
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
-[[package]]
-name = "errno"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
-dependencies = [
- "libc",
- "windows-sys 0.52.0",
-]
-
[[package]]
name = "exr"
version = "1.71.0"
@@ -458,15 +427,11 @@ name = "fishbowl"
version = "0.1.0"
dependencies = [
"bytemuck",
- "clap",
- "flexi_logger",
"futures",
"futures-intrusive",
"gif",
"image",
- "indicatif",
- "log",
- "pollster",
+ "tokio",
"wgpu",
]
@@ -480,31 +445,12 @@ dependencies = [
"miniz_oxide",
]
-[[package]]
-name = "flexi_logger"
-version = "0.27.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ac35b454b60e1836602173e2eb7ef531173388c0212e02ec7f9fac086159ee5"
-dependencies = [
- "chrono",
- "glob",
- "is-terminal",
- "lazy_static",
- "log",
- "nu-ansi-term",
- "regex",
- "thiserror",
-]
-
[[package]]
name = "flume"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
- "futures-core",
- "futures-sink",
- "nanorand",
"spin",
]
@@ -526,7 +472,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
]
[[package]]
@@ -602,7 +548,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
]
[[package]]
@@ -637,22 +583,20 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.12"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
+checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
dependencies = [
"cfg-if",
- "js-sys",
"libc",
"wasi",
- "wasm-bindgen",
]
[[package]]
name = "gif"
-version = "0.12.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
+checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2"
dependencies = [
"color_quant",
"weezl",
@@ -675,17 +619,11 @@ dependencies = [
"xml-rs",
]
-[[package]]
-name = "glob"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
-
[[package]]
name = "glow"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "886c2a30b160c4c6fec8f987430c26b526b7988ca71f664e6a699ddf6f9601e4"
+checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1"
dependencies = [
"js-sys",
"slotmap",
@@ -723,11 +661,10 @@ dependencies = [
[[package]]
name = "gpu-allocator"
-version = "0.23.0"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad"
+checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884"
dependencies = [
- "backtrace",
"log",
"presser",
"thiserror",
@@ -776,14 +713,14 @@ dependencies = [
[[package]]
name = "hassle-rs"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0"
+checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890"
dependencies = [
- "bitflags 1.3.2",
- "com-rs",
+ "bitflags 2.4.1",
+ "com",
"libc",
- "libloading 0.7.4",
+ "libloading 0.8.1",
"thiserror",
"widestring",
"winapi",
@@ -791,15 +728,15 @@ dependencies = [
[[package]]
name = "heck"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
-version = "0.3.3"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "hexf-parse"
@@ -807,48 +744,45 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
-[[package]]
-name = "iana-time-zone"
-version = "0.1.59"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539"
-dependencies = [
- "android_system_properties",
- "core-foundation-sys",
- "iana-time-zone-haiku",
- "js-sys",
- "wasm-bindgen",
- "windows-core",
-]
-
-[[package]]
-name = "iana-time-zone-haiku"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
-dependencies = [
- "cc",
-]
-
[[package]]
name = "image"
-version = "0.24.7"
+version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
+checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
"exr",
"gif",
- "jpeg-decoder",
- "num-rational",
+ "image-webp",
"num-traits",
"png",
"qoi",
+ "ravif",
+ "rayon",
+ "rgb",
"tiff",
+ "zune-core",
+ "zune-jpeg",
]
+[[package]]
+name = "image-webp"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d730b085583c4d789dfd07fdcf185be59501666a90c97c40162b37e4fdad272d"
+dependencies = [
+ "byteorder-lite",
+ "thiserror",
+]
+
+[[package]]
+name = "imgref"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126"
+
[[package]]
name = "indexmap"
version = "2.1.0"
@@ -860,36 +794,38 @@ dependencies = [
]
[[package]]
-name = "indicatif"
-version = "0.17.7"
+name = "interpolate_name"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25"
+checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [
- "console",
- "instant",
- "number_prefix",
- "portable-atomic",
- "unicode-width",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
]
[[package]]
-name = "instant"
-version = "0.1.12"
+name = "itertools"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
- "cfg-if",
+ "either",
]
[[package]]
-name = "is-terminal"
-version = "0.4.10"
+name = "jni-sys"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+
+[[package]]
+name = "jobserver"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e"
dependencies = [
- "hermit-abi",
- "rustix",
- "windows-sys 0.52.0",
+ "libc",
]
[[package]]
@@ -897,9 +833,6 @@ name = "jpeg-decoder"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e"
-dependencies = [
- "rayon",
-]
[[package]]
name = "js-sys"
@@ -927,12 +860,6 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-
[[package]]
name = "lebe"
version = "0.5.2"
@@ -945,6 +872,17 @@ version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
+[[package]]
+name = "libfuzzer-sys"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7"
+dependencies = [
+ "arbitrary",
+ "cc",
+ "once_cell",
+]
+
[[package]]
name = "libloading"
version = "0.7.4"
@@ -965,12 +903,6 @@ dependencies = [
"windows-sys 0.48.0",
]
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
-
[[package]]
name = "lock_api"
version = "0.4.11"
@@ -987,6 +919,15 @@ version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+[[package]]
+name = "loop9"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
+dependencies = [
+ "imgref",
+]
+
[[package]]
name = "malloc_buf"
version = "0.0.6"
@@ -996,6 +937,16 @@ dependencies = [
"libc",
]
+[[package]]
+name = "maybe-rayon"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
+dependencies = [
+ "cfg-if",
+ "rayon",
+]
+
[[package]]
name = "memchr"
version = "2.7.1"
@@ -1017,6 +968,12 @@ dependencies = [
"paste",
]
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
[[package]]
name = "miniz_oxide"
version = "0.7.1"
@@ -1028,10 +985,21 @@ dependencies = [
]
[[package]]
-name = "naga"
-version = "0.14.2"
+name = "mio"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae585df4b6514cf8842ac0f1ab4992edc975892704835b549cf818dc0191249e"
+checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "naga"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843"
dependencies = [
"bit-set",
"bitflags 2.4.1",
@@ -1048,21 +1016,56 @@ dependencies = [
]
[[package]]
-name = "nanorand"
-version = "0.7.0"
+name = "ndk-sys"
+version = "0.5.0+25.2.9519653"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
+checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691"
dependencies = [
- "getrandom",
+ "jni-sys",
]
[[package]]
-name = "nu-ansi-term"
-version = "0.49.0"
+name = "new_debug_unreachable"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
- "windows-sys 0.48.0",
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "noop_proc_macro"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
+
+[[package]]
+name = "num-bigint"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-derive"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
]
[[package]]
@@ -1082,6 +1085,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
+ "num-bigint",
"num-integer",
"num-traits",
]
@@ -1096,10 +1100,14 @@ dependencies = [
]
[[package]]
-name = "number_prefix"
-version = "0.4.0"
+name = "num_cpus"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
[[package]]
name = "objc"
@@ -1196,16 +1204,10 @@ dependencies = [
]
[[package]]
-name = "pollster"
-version = "0.3.0"
+name = "ppv-lite86"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2"
-
-[[package]]
-name = "portable-atomic"
-version = "1.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "presser"
@@ -1227,6 +1229,19 @@ name = "profiling"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d135ede8821cf6376eb7a64148901e1690b788c11ae94dc297ae917dbc91dc0e"
+dependencies = [
+ "profiling-procmacros",
+]
+
+[[package]]
+name = "profiling-procmacros"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
+dependencies = [
+ "quote",
+ "syn 2.0.48",
+]
[[package]]
name = "qoi"
@@ -1237,6 +1252,12 @@ dependencies = [
"bytemuck",
]
+[[package]]
+name = "quick-error"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
+
[[package]]
name = "quote"
version = "1.0.35"
@@ -1246,6 +1267,36 @@ dependencies = [
"proc-macro2",
]
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "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.3"
@@ -1253,10 +1304,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab"
[[package]]
-name = "raw-window-handle"
-version = "0.5.2"
+name = "rav1e"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
+checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
+dependencies = [
+ "arbitrary",
+ "arg_enum_proc_macro",
+ "arrayvec",
+ "av1-grain",
+ "bitstream-io",
+ "built",
+ "cfg-if",
+ "interpolate_name",
+ "itertools",
+ "libc",
+ "libfuzzer-sys",
+ "log",
+ "maybe-rayon",
+ "new_debug_unreachable",
+ "noop_proc_macro",
+ "num-derive",
+ "num-traits",
+ "once_cell",
+ "paste",
+ "profiling",
+ "rand",
+ "rand_chacha",
+ "simd_helpers",
+ "system-deps",
+ "thiserror",
+ "v_frame",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "ravif"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234"
+dependencies = [
+ "avif-serialize",
+ "imgref",
+ "loop9",
+ "quick-error",
+ "rav1e",
+ "rayon",
+ "rgb",
+]
+
+[[package]]
+name = "raw-window-handle"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b"
[[package]]
name = "rayon"
@@ -1287,41 +1388,21 @@ dependencies = [
"bitflags 1.3.2",
]
-[[package]]
-name = "regex"
-version = "1.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
-
[[package]]
name = "renderdoc-sys"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b"
+[[package]]
+name = "rgb"
+version = "0.8.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8"
+dependencies = [
+ "bytemuck",
+]
+
[[package]]
name = "rustc-demangle"
version = "0.1.23"
@@ -1334,31 +1415,65 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
-[[package]]
-name = "rustix"
-version = "0.38.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca"
-dependencies = [
- "bitflags 2.4.1",
- "errno",
- "libc",
- "linux-raw-sys",
- "windows-sys 0.52.0",
-]
-
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+[[package]]
+name = "serde"
+version = "1.0.198"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.198"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "simd-adler32"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+[[package]]
+name = "simd_helpers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
+dependencies = [
+ "quote",
+]
+
[[package]]
name = "slab"
version = "0.4.9"
@@ -1383,6 +1498,16 @@ version = "1.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
+[[package]]
+name = "socket2"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "spin"
version = "0.9.8"
@@ -1394,12 +1519,11 @@ dependencies = [
[[package]]
name = "spirv"
-version = "0.2.0+1.5.4"
+version = "0.3.0+sdk-1.3.268.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830"
+checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844"
dependencies = [
- "bitflags 1.3.2",
- "num-traits",
+ "bitflags 2.4.1",
]
[[package]]
@@ -1409,10 +1533,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
-name = "strsim"
-version = "0.10.0"
+name = "syn"
+version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
[[package]]
name = "syn"
@@ -1425,6 +1554,25 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "system-deps"
+version = "6.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
+dependencies = [
+ "cfg-expr",
+ "heck",
+ "pkg-config",
+ "toml",
+ "version-compare",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
+
[[package]]
name = "termcolor"
version = "1.4.1"
@@ -1451,7 +1599,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
]
[[package]]
@@ -1465,6 +1613,70 @@ dependencies = [
"weezl",
]
+[[package]]
+name = "tokio"
+version = "1.37.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "num_cpus",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.22.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
[[package]]
name = "unicode-ident"
version = "1.0.12"
@@ -1484,10 +1696,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
-name = "utf8parse"
-version = "0.2.1"
+name = "v_frame"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
+dependencies = [
+ "aligned-vec",
+ "num-traits",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "version-compare"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
[[package]]
name = "version_check"
@@ -1522,7 +1745,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
"wasm-bindgen-shared",
]
@@ -1556,7 +1779,7 @@ checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -1569,9 +1792,9 @@ checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
[[package]]
name = "web-sys"
-version = "0.3.64"
+version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
+checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -1579,19 +1802,19 @@ dependencies = [
[[package]]
name = "weezl"
-version = "0.1.7"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]]
name = "wgpu"
-version = "0.18.0"
+version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24"
+checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01"
dependencies = [
"arrayvec",
"cfg-if",
- "flume",
+ "cfg_aliases",
"js-sys",
"log",
"naga",
@@ -1610,16 +1833,19 @@ dependencies = [
[[package]]
name = "wgpu-core"
-version = "0.18.1"
+version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef91c1d62d1e9e81c79e600131a258edf75c9531cbdbde09c44a011a47312726"
+checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a"
dependencies = [
"arrayvec",
"bit-vec",
"bitflags 2.4.1",
+ "cfg_aliases",
"codespan-reporting",
+ "indexmap",
"log",
"naga",
+ "once_cell",
"parking_lot",
"profiling",
"raw-window-handle",
@@ -1633,9 +1859,9 @@ dependencies = [
[[package]]
name = "wgpu-hal"
-version = "0.18.1"
+version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b84ecc802da3eb67b4cf3dd9ea6fe45bbb47ef13e6c49c5c3240868a9cc6cdd9"
+checksum = "fc1a4924366df7ab41a5d8546d6534f1f33231aa5b3f72b9930e300f254e39c3"
dependencies = [
"android_system_properties",
"arrayvec",
@@ -1643,6 +1869,7 @@ dependencies = [
"bit-set",
"bitflags 2.4.1",
"block",
+ "cfg_aliases",
"core-graphics-types",
"d3d12",
"glow",
@@ -1658,6 +1885,7 @@ dependencies = [
"log",
"metal",
"naga",
+ "ndk-sys",
"objc",
"once_cell",
"parking_lot",
@@ -1676,9 +1904,9 @@ dependencies = [
[[package]]
name = "wgpu-types"
-version = "0.18.0"
+version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd"
+checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805"
dependencies = [
"bitflags 2.4.1",
"js-sys",
@@ -1756,7 +1984,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets 0.52.0",
+ "windows-targets 0.52.5",
]
[[package]]
@@ -1776,17 +2004,18 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
dependencies = [
- "windows_aarch64_gnullvm 0.52.0",
- "windows_aarch64_msvc 0.52.0",
- "windows_i686_gnu 0.52.0",
- "windows_i686_msvc 0.52.0",
- "windows_x86_64_gnu 0.52.0",
- "windows_x86_64_gnullvm 0.52.0",
- "windows_x86_64_msvc 0.52.0",
+ "windows_aarch64_gnullvm 0.52.5",
+ "windows_aarch64_msvc 0.52.5",
+ "windows_i686_gnu 0.52.5",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc 0.52.5",
+ "windows_x86_64_gnu 0.52.5",
+ "windows_x86_64_gnullvm 0.52.5",
+ "windows_x86_64_msvc 0.52.5",
]
[[package]]
@@ -1797,9 +2026,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
+checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
[[package]]
name = "windows_aarch64_msvc"
@@ -1809,9 +2038,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
+checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
[[package]]
name = "windows_i686_gnu"
@@ -1821,9 +2050,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
+checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
[[package]]
name = "windows_i686_msvc"
@@ -1833,9 +2068,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
+checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
[[package]]
name = "windows_x86_64_gnu"
@@ -1845,9 +2080,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
+checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
[[package]]
name = "windows_x86_64_gnullvm"
@@ -1857,9 +2092,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
+checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
[[package]]
name = "windows_x86_64_msvc"
@@ -1869,9 +2104,18 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
+checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+
+[[package]]
+name = "winnow"
+version = "0.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352"
+dependencies = [
+ "memchr",
+]
[[package]]
name = "xml-rs"
@@ -1896,9 +2140,15 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.48",
]
+[[package]]
+name = "zune-core"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
+
[[package]]
name = "zune-inflate"
version = "0.2.54"
@@ -1907,3 +2157,12 @@ checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
dependencies = [
"simd-adler32",
]
+
+[[package]]
+name = "zune-jpeg"
+version = "0.4.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448"
+dependencies = [
+ "zune-core",
+]
diff --git a/Cargo.toml b/Cargo.toml
index a00455e..b554e5c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,19 +6,15 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-log = "0.4"
-image = "0.24"
-gif = "0.12"
+# log = "0.4"
+image = "0.25"
+gif = "0.13"
futures = "0.3"
-wgpu = {version="0.18", features=["webgl"]}
+tokio = {version="1.37", features=["full"]}
+wgpu = {version="0.19"}
bytemuck = {version="1.14", features=["derive"]}
futures-intrusive = "0.5"
-pollster = "0.3"
-clap = { version = "4.4.16", features = ["derive"] }
-indicatif = "0.17"
-[dev-dependencies]
-flexi_logger = "0.27"
[profile.dev]
opt-level=1
diff --git a/garden.gif b/garden.gif
deleted file mode 100644
index a413f30..0000000
Binary files a/garden.gif and /dev/null differ
diff --git a/resources/cat.jpg b/resources/cat.jpg
new file mode 100644
index 0000000..ecdc946
Binary files /dev/null and b/resources/cat.jpg differ
diff --git a/resources/dog.jpg b/resources/dog.jpg
new file mode 100644
index 0000000..46ba759
Binary files /dev/null and b/resources/dog.jpg differ
diff --git a/resources/goback.jpg b/resources/goback.jpg
new file mode 100644
index 0000000..4297635
Binary files /dev/null and b/resources/goback.jpg differ
diff --git a/resources/skull.png b/resources/skull.png
new file mode 100644
index 0000000..edb32f3
Binary files /dev/null and b/resources/skull.png differ
diff --git a/resources/starry.jpg b/resources/starry.jpg
new file mode 100644
index 0000000..27922ec
Binary files /dev/null and b/resources/starry.jpg differ
diff --git a/resources/starved.jpg b/resources/starved.jpg
new file mode 100644
index 0000000..8048a36
Binary files /dev/null and b/resources/starved.jpg differ
diff --git a/resources/stoic.jpg b/resources/stoic.jpg
new file mode 100644
index 0000000..5fe8564
Binary files /dev/null and b/resources/stoic.jpg differ
diff --git a/resources/web-assembly-icon.svg b/resources/web-assembly-icon.svg
new file mode 100644
index 0000000..64775a9
--- /dev/null
+++ b/resources/web-assembly-icon.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/resources/wimpy.png b/resources/wimpy.png
new file mode 100644
index 0000000..d323525
Binary files /dev/null and b/resources/wimpy.png differ
diff --git a/src/draw.rs b/src/draw.rs
index e76c31f..034b352 100644
--- a/src/draw.rs
+++ b/src/draw.rs
@@ -118,7 +118,7 @@ pub struct QuickDraw {
}
impl QuickDraw {
- pub async fn new(width: u32, height: u32, max_circles: u64) -> Self {
+ pub async fn new(width: u32, height: u32, max_circles: u64) -> Option {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
..Default::default()
@@ -135,7 +135,7 @@ impl QuickDraw {
Some(a) => a,
None => {
eprintln!("Could not find WGPU adapter");
- std::process::exit(1);
+ return None;
},
};
let (device, queue) =
@@ -144,7 +144,7 @@ impl QuickDraw {
Err(e) => {
eprintln!("Could not find WGPU device:");
eprintln!("{}", e);
- std::process::exit(1);
+ return None;
},
};
@@ -277,7 +277,7 @@ impl QuickDraw {
},
});
- Self {
+ Some(Self {
device,
queue,
width,
@@ -292,7 +292,7 @@ impl QuickDraw {
output_buffer,
vertex_buffer,
pipeline,
- }
+ })
}
pub async fn resize(&mut self, width: u32, height: u32, max_circles: usize) {
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..a5f2b35
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,207 @@
+#![feature(future_join)]
+use std::{
+ cell::RefCell,
+ future::join,
+ io::{Cursor, Write},
+ path::Path,
+ sync::Arc,
+};
+
+use tokio::sync::Mutex;
+
+use draw::QuickDraw;
+use gif::Frame;
+use image::{ImageBuffer, Rgb};
+
+pub mod draw;
+pub mod helper;
+pub mod sim;
+pub mod tests;
+
+const WIDTH: f32 = 512.0;
+const HEIGHT: f32 = 512.0;
+
+pub async fn preprocess(
+ image: ImageBuffer, Vec>,
+ radius: f32,
+) -> (sim::Simulation, usize, usize) {
+ let (sim, it, max_circles) =
+ sim::Simulation::simulate_image(WIDTH, HEIGHT, radius, image).await;
+ (sim, it, max_circles)
+}
+
+pub async fn simulate(
+ draw: Arc>,
+ mut sim: Simulation,
+ it: usize,
+ step: usize,
+ max_circles: usize,
+) -> Vec> {
+ let _draw = draw;
+ let mut draw = _draw.lock().await;
+ draw.resize(WIDTH as u32, HEIGHT as u32, max_circles).await;
+ let mut frames = vec![];
+ // let progress =
+ // make_progress("Simulating ", ((it - sim.clock) /
+ // sim.substeps) as u64);
+ while sim.clock < it {
+ let circles = &sim
+ .circles
+ .iter()
+ .map(|c| draw::Circle {
+ position: [c.position.x, c.position.y],
+ radius: c.radius,
+ color: [c.color.0, c.color.1, c.color.2, 255],
+ })
+ .collect::>();
+ let bytes_future = draw.draw_circles(circles);
+ let steps = sim.steps(step);
+ let mut bytes = join!(bytes_future, steps).await.0;
+ let frame =
+ gif::Frame::from_rgba_speed(WIDTH as u16, HEIGHT as u16, &mut bytes, 10);
+ frames.push(frame);
+ // progress.inc(step as u64);
+ }
+ // progress.finish();
+ frames
+}
+
+pub async fn encode(frames: Vec>, repeat: bool) -> Vec {
+ let mut buffer = Vec::::new();
+ let mut encoder =
+ gif::Encoder::new(&mut buffer, WIDTH as u16, HEIGHT as u16, &[]).unwrap();
+ for mut frame in frames {
+ frame.delay = 1;
+ encoder.write_frame(&frame).unwrap();
+ }
+ if repeat {
+ encoder.set_repeat(gif::Repeat::Infinite).unwrap();
+ }
+ drop(encoder);
+ buffer
+}
+
+// use clap::Parser;
+use sim::Simulation;
+// #[derive(Parser, Debug)]
+// #[command(author, version, about, long_about = None)]
+// struct Args {
+// /// Input file to process. All common image types are
+// /// supported, see the `image` crate docs for specific
+// /// compatibility
+// #[arg(short = 'i', value_hint =
+// clap::ValueHint::DirPath)] input: std::path::PathBuf,
+//
+// /// Output file path ('./output.gif' by default)
+// #[arg(short = 'o', value_hint =
+// clap::ValueHint::DirPath)]
+// output: Option,
+//
+// /// How many physics-steps between frames. Affects the
+// /// speed and length of the animation
+// #[arg(short = 's')]
+// step: Option,
+//
+// /// Radius of the circle, smaller means more detailed
+// but /// slower to compute (8.0 by default, must be
+// between /// 1.0 and 50.0 inclusive)
+// #[arg(short = 'r')]
+// radius: Option,
+//
+// /// Loop the GIF
+// #[arg(short = 'l', long = "loop")]
+// looping: bool,
+// }
+//
+// fn open_image>(path: P) ->
+// ImageBuffer, Vec> { let image = match
+// image::io::Reader::open(path) { Ok(i) => i,
+// Err(e) => {
+// eprintln!("Error opening file for processing: ");
+// eprintln!("{}", e);
+// std::process::exit(1);
+// },
+// };
+//
+// let decoded = match image.decode() {
+// Ok(d) => d,
+// Err(e) => {
+// eprintln!("Error processing file: ");
+// eprintln!("{}", e);
+// std::process::exit(1);
+// },
+// };
+// decoded.to_rgb8()
+// }
+
+#[derive(Debug, Clone)]
+pub enum Error {
+ CantGuessFormat,
+ DecodeError,
+}
+
+pub async fn make_quickdraw() -> Option>> {
+ Some(Arc::new(Mutex::new(QuickDraw::new(512, 512, 1000).await?)))
+}
+
+pub async fn make_gif(
+ input: &[u8],
+ draw: Arc>,
+) -> Result, Error> {
+ let step = 20;
+ let radius = 7.0;
+ let image = image::io::Reader::new(Cursor::new(input.to_vec().as_slice()))
+ .with_guessed_format()
+ .map_err(|_| Error::CantGuessFormat)?
+ .decode()
+ .map_err(|_| Error::DecodeError)?
+ .to_rgb8();
+ let (sim, it, max) = preprocess(image, radius).await;
+ let frames = simulate(draw, sim, it, step, max).await;
+ let gif = encode(frames, true).await;
+ Ok(gif)
+}
+
+// fn main() {
+// let args = Args::parse();
+//
+// let output =
+// args.output.unwrap_or("output.gif".into()); let step =
+// args.step.unwrap_or(20) as usize; if step == 0 {
+// eprintln!("Physics step cannot be 0");
+// std::process::exit(1);
+// }
+// let radius = args.radius.unwrap_or(8.0);
+// if radius < 1.0 || radius > 50.0 {
+// eprintln!("Invalid radius {}", radius);
+// eprintln!("Must be between 1.0 and 50.0 inclusive");
+// std::process::exit(1);
+// }
+//
+// let image = open_image(args.input);
+// let (sim, it, max) =
+// pollster::block_on(preprocess(image, radius));
+// let mut draw = pollster::block_on(QuickDraw::new(512,
+// 512, 1000)); let frames =
+// pollster::block_on(simulate(&mut draw, sim, it, step,
+// max)); let gif = pollster::block_on(encode(frames,
+// args.looping)); let mut file = match
+// std::fs::File::create(output.clone()) { Ok(f) => f,
+// Err(e) => {
+// eprintln!("Error opening file for writing:");
+// eprintln!("{}", e);
+// std::process::exit(1);
+// },
+// };
+//
+// match file.write(&gif) {
+// Ok(_) => {
+// println!("Successfully created file at '{}'",
+// output.display()); },
+// Err(e) => {
+// eprintln!("Error writing output file: ");
+// eprintln!("{}", e);
+// std::process::exit(1);
+// },
+// };
+// }
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index a3166f9..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,176 +0,0 @@
-#![feature(future_join)]
-use std::{cell::RefCell, future::join, io::Write, path::Path, sync::Arc};
-
-use draw::QuickDraw;
-use gif::Frame;
-use image::{ImageBuffer, Rgb};
-use indicatif::{ProgressBar, ProgressStyle};
-use log::debug;
-
-pub mod draw;
-pub mod helper;
-pub mod sim;
-pub mod tests;
-
-pub fn make_progress(msg: &'static str, max: u64) -> ProgressBar {
- let progress = ProgressBar::new(max);
- progress.set_style(ProgressStyle::with_template("{msg} :: {bar}").unwrap());
- progress.set_message(msg);
- progress
-}
-
-const WIDTH: f32 = 512.0;
-const HEIGHT: f32 = 512.0;
-
-pub async fn preprocess(
- image: ImageBuffer, Vec>,
- radius: f32,
-) -> (sim::Simulation, usize, usize) {
- let (sim, it, max_circles) =
- sim::Simulation::simulate_image(WIDTH, HEIGHT, radius, image).await;
- (sim, it, max_circles)
-}
-
-pub async fn simulate(
- draw: &mut QuickDraw,
- mut sim: Simulation,
- it: usize,
- step: usize,
- max_circles: usize,
-) -> Vec> {
- draw.resize(WIDTH as u32, HEIGHT as u32, max_circles).await;
- let mut frames = vec![];
- let progress =
- make_progress("Simulating ", ((it - sim.clock) / sim.substeps) as u64);
- while sim.clock < it {
- let circles = &sim
- .circles
- .iter()
- .map(|c| draw::Circle {
- position: [c.position.x, c.position.y],
- radius: c.radius,
- color: [c.color.0, c.color.1, c.color.2, 255],
- })
- .collect::>();
- let bytes_future = draw.draw_circles(circles);
- let steps = sim.steps(step);
- let mut bytes = join!(bytes_future, steps).await.0;
- let frame = gif::Frame::from_rgba(WIDTH as u16, HEIGHT as u16, &mut bytes);
- frames.push(frame);
- progress.inc(step as u64);
- }
- progress.finish();
- frames
-}
-
-pub async fn encode(frames: Vec>, repeat: bool) -> Vec {
- let mut buffer = Vec::::new();
- let mut encoder =
- gif::Encoder::new(&mut buffer, WIDTH as u16, HEIGHT as u16, &[]).unwrap();
- let progress = make_progress("Encoding ", frames.len() as u64);
- for mut frame in frames {
- frame.delay = 1;
- encoder.write_frame(&frame).unwrap();
- progress.inc(1);
- }
- progress.finish();
- if repeat {
- encoder.set_repeat(gif::Repeat::Infinite).unwrap();
- }
- drop(encoder);
- buffer
-}
-
-use clap::Parser;
-use sim::Simulation;
-#[derive(Parser, Debug)]
-#[command(author, version, about, long_about = None)]
-struct Args {
- /// Input file to process. All common image types are
- /// supported, see the `image` crate docs for specific
- /// compatibility
- #[arg(short = 'i', value_hint = clap::ValueHint::DirPath)]
- input: std::path::PathBuf,
-
- /// Output file path ('./output.gif' by default)
- #[arg(short = 'o', value_hint = clap::ValueHint::DirPath)]
- output: Option,
-
- /// How many physics-steps between frames. Affects the
- /// speed and length of the animation
- #[arg(short = 's')]
- step: Option,
-
- /// Radius of the circle, smaller means more detailed but
- /// slower to compute (8.0 by default, must be between
- /// 1.0 and 50.0 inclusive)
- #[arg(short = 'r')]
- radius: Option,
-
- /// Loop the GIF
- #[arg(short = 'l', long = "loop")]
- looping: bool,
-}
-
-fn open_image>(path: P) -> ImageBuffer, Vec> {
- let image = match image::io::Reader::open(path) {
- Ok(i) => i,
- Err(e) => {
- eprintln!("Error opening file for processing: ");
- eprintln!("{}", e);
- std::process::exit(1);
- },
- };
-
- let decoded = match image.decode() {
- Ok(d) => d,
- Err(e) => {
- eprintln!("Error processing file: ");
- eprintln!("{}", e);
- std::process::exit(1);
- },
- };
- decoded.to_rgb8()
-}
-
-fn main() {
- let args = Args::parse();
-
- let output = args.output.unwrap_or("output.gif".into());
- let step = args.step.unwrap_or(20) as usize;
- if step == 0 {
- eprintln!("Physics step cannot be 0");
- std::process::exit(1);
- }
- let radius = args.radius.unwrap_or(8.0);
- if radius < 1.0 || radius > 50.0 {
- eprintln!("Invalid radius {}", radius);
- eprintln!("Must be between 1.0 and 50.0 inclusive");
- std::process::exit(1);
- }
-
- let image = open_image(args.input);
- let (sim, it, max) = pollster::block_on(preprocess(image, radius));
- let mut draw = pollster::block_on(QuickDraw::new(512, 512, 1000));
- let frames = pollster::block_on(simulate(&mut draw, sim, it, step, max));
- let gif = pollster::block_on(encode(frames, args.looping));
- let mut file = match std::fs::File::create(output.clone()) {
- Ok(f) => f,
- Err(e) => {
- eprintln!("Error opening file for writing:");
- eprintln!("{}", e);
- std::process::exit(1);
- },
- };
-
- match file.write(&gif) {
- Ok(_) => {
- println!("Successfully created file at '{}'", output.display());
- },
- Err(e) => {
- eprintln!("Error writing output file: ");
- eprintln!("{}", e);
- std::process::exit(1);
- },
- };
-}
diff --git a/src/sim.rs b/src/sim.rs
index 5d84260..eb954eb 100644
--- a/src/sim.rs
+++ b/src/sim.rs
@@ -1,6 +1,6 @@
use std::hash::{Hash, Hasher};
-use crate::{helper::*, make_progress};
+use crate::helper::*;
use image::{ImageBuffer, Rgb};
pub struct Circle {
@@ -85,19 +85,19 @@ impl Simulation {
s.finish()
} % 1204) as usize;
let mut sim = Simulation::new(width, height, circle_radius, image_hash);
- let progress = make_progress(
- "Preprocessing",
- (sim.max_circles + Self::POST_PROCESS) as u64,
- );
+ // let progress = make_progress(
+ // "Preprocessing",
+ // (sim.max_circles + Self::POST_PROCESS) as u64,
+ // );
while sim.circles() < sim.max_circles {
sim.step().await;
- progress.inc(2);
+ // progress.inc(2);
}
for _ in 0..Self::POST_PROCESS {
sim.step().await;
- progress.inc(1);
+ // progress.inc(1);
}
- progress.finish();
+ // progress.finish();
let total_iterations = sim.clock;
let max_circles = sim.circles.len();
sim.assign_colors_from_image(img).await;
@@ -144,7 +144,7 @@ impl Simulation {
// Insertion sort
#[inline]
- async fn sort(&mut self) {
+ fn sort(&mut self) {
if self.circles.len() == 1 {
return;
}
@@ -159,7 +159,7 @@ impl Simulation {
}
#[inline]
- async fn integrate(&mut self) {
+ fn integrate(&mut self) {
let delta = self.timescale * (1.0 / self.substeps as f32);
let gravity = Vector2::new(0.0, self.gravity) * delta.powi(2);
self.circles.iter_mut().for_each(|circle| {
@@ -170,7 +170,7 @@ impl Simulation {
}
#[inline]
- async fn collide(&mut self) {
+ fn collide(&mut self) {
for i in 0..self.circles.len() {
// Apply gravity
for j in i..self.circles.len() {
@@ -228,9 +228,9 @@ impl Simulation {
for _ in 0..self.substeps {
self.constrain_rect();
- self.sort().await;
- self.collide().await;
- self.integrate().await;
+ self.sort();
+ self.collide();
+ self.integrate();
self.clock += 1;
}
}
diff --git a/src/tests.rs b/src/tests.rs
index 2a25f37..2b53a78 100644
--- a/src/tests.rs
+++ b/src/tests.rs
@@ -2,7 +2,7 @@
#[test]
fn bench_async() {
use std::io::Write;
- flexi_logger::Logger::try_with_str("debug").unwrap();
+ // flexi_logger::Logger::try_with_str("debug").unwrap();
let image = image::io::Reader::open(
"resources/mona
diff --git a/test.gif b/test.gif
deleted file mode 100644
index ff70e07..0000000
Binary files a/test.gif and /dev/null differ