Make ray loading more consistent
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
4b2b0c14ec
commit
a28bf6b63f
|
@ -72,15 +72,6 @@ dependencies = [
|
|||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.65"
|
||||
|
@ -161,7 +152,7 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"lazycell",
|
||||
"peeking_take_while",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
|
@ -296,9 +287,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cargo_toml"
|
||||
version = "0.11.6"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4419e9adae9fd7e231b60d50467481bf8181ddeef6ed54683b23ae925c74c9c"
|
||||
checksum = "e72c3ff59e3b7d24630206bb63a73af65da4ed5df1f76ee84dfafb9fee2ba60e"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
|
@ -395,9 +386,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "1.3.3"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b"
|
||||
checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
|
@ -614,28 +605,32 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.10"
|
||||
version = "0.9.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1"
|
||||
checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"memoffset",
|
||||
"once_cell",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.11"
|
||||
version = "0.8.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"
|
||||
checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crunchy"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.6"
|
||||
|
@ -657,10 +652,10 @@ dependencies = [
|
|||
"itoa 0.4.8",
|
||||
"matches",
|
||||
"phf 0.8.0",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"smallvec",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -670,7 +665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e"
|
||||
dependencies = [
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -680,7 +675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb"
|
||||
dependencies = [
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -707,10 +702,10 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
|
|||
dependencies = [
|
||||
"fnv",
|
||||
"ident_case",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"strsim",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -721,7 +716,7 @@ checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
|
|||
dependencies = [
|
||||
"darling_core",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -741,10 +736,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"rustc_version 0.4.0",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -855,9 +850,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
|
||||
checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"humantime",
|
||||
|
@ -868,15 +863,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "exr"
|
||||
version = "1.5.0"
|
||||
version = "1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78c26a90d9dd411a3d119d6f55752fb4c134ca243250c32fb9cab7b2561638d2"
|
||||
checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded"
|
||||
dependencies = [
|
||||
"bit_field",
|
||||
"flume",
|
||||
"half",
|
||||
"lebe",
|
||||
"miniz_oxide",
|
||||
"miniz_oxide 0.6.2",
|
||||
"smallvec",
|
||||
"threadpool",
|
||||
]
|
||||
|
@ -919,7 +914,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"miniz_oxide",
|
||||
"miniz_oxide 0.5.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1022,9 +1017,9 @@ version = "0.3.24"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1251,9 +1246,9 @@ dependencies = [
|
|||
"heck 0.4.0",
|
||||
"proc-macro-crate",
|
||||
"proc-macro-error",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1346,16 +1341,19 @@ dependencies = [
|
|||
"anyhow",
|
||||
"proc-macro-crate",
|
||||
"proc-macro-error",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "half"
|
||||
version = "1.8.2"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
||||
checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554"
|
||||
dependencies = [
|
||||
"crunchy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
|
@ -1405,9 +1403,9 @@ dependencies = [
|
|||
"log",
|
||||
"mac",
|
||||
"markup5ever",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1418,7 +1416,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
|
|||
dependencies = [
|
||||
"bytes",
|
||||
"fnv",
|
||||
"itoa 1.0.3",
|
||||
"itoa 1.0.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1479,9 +1477,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.24.3"
|
||||
version = "0.24.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e30ca2ecf7666107ff827a8e481de6a132a9b687ed3bb20bb1c144a36c00964"
|
||||
checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
|
@ -1561,9 +1559,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
|||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
|
||||
checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
|
||||
|
||||
[[package]]
|
||||
name = "jack"
|
||||
|
@ -1638,9 +1636,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
|||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.24"
|
||||
version = "0.1.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
|
||||
checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
@ -1726,9 +1724,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.132"
|
||||
version = "0.2.135"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
|
||||
checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
@ -1751,9 +1749,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.8"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390"
|
||||
checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"scopeguard",
|
||||
|
@ -1866,6 +1864,15 @@ dependencies = [
|
|||
"adler",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
|
||||
dependencies = [
|
||||
"adler",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.8.4"
|
||||
|
@ -1991,15 +1998,25 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
||||
dependencies = [
|
||||
"overload",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-derive"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2069,9 +2086,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2147,9 +2164,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.14.0"
|
||||
version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
|
||||
checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
|
@ -2163,6 +2180,12 @@ version = "6.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
|
||||
|
||||
[[package]]
|
||||
name = "overload"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "pango"
|
||||
version = "0.15.10"
|
||||
|
@ -2254,9 +2277,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
|||
|
||||
[[package]]
|
||||
name = "pest"
|
||||
version = "2.3.1"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb779fcf4bb850fbbb0edc96ff6cf34fd90c4b1a112ce042653280d9a7364048"
|
||||
checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a"
|
||||
dependencies = [
|
||||
"thiserror",
|
||||
"ucd-trie",
|
||||
|
@ -2323,9 +2346,9 @@ dependencies = [
|
|||
"phf_generator 0.8.0",
|
||||
"phf_shared 0.8.0",
|
||||
"proc-macro-hack",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2337,9 +2360,9 @@ dependencies = [
|
|||
"phf_generator 0.10.0",
|
||||
"phf_shared 0.10.0",
|
||||
"proc-macro-hack",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2375,9 +2398,9 @@ version = "1.0.12"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2433,7 +2456,7 @@ dependencies = [
|
|||
"bitflags",
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
"miniz_oxide",
|
||||
"miniz_oxide 0.5.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2466,9 +2489,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
||||
dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
|
@ -2478,7 +2501,7 @@ version = "1.0.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"version_check",
|
||||
]
|
||||
|
@ -2500,9 +2523,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.43"
|
||||
version = "1.0.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
|
||||
checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
@ -2531,7 +2554,7 @@ version = "1.0.21"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2857,31 +2880,31 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.144"
|
||||
version = "1.0.145"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"
|
||||
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.144"
|
||||
version = "1.0.145"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"
|
||||
checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.85"
|
||||
version = "1.0.86"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
|
||||
checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074"
|
||||
dependencies = [
|
||||
"itoa 1.0.3",
|
||||
"itoa 1.0.4",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
@ -2892,9 +2915,9 @@ version = "0.1.9"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2914,9 +2937,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2936,9 +2959,9 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3014,9 +3037,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.9.0"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
|
||||
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
|
@ -3108,7 +3131,7 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
|
|||
dependencies = [
|
||||
"phf_generator 0.10.0",
|
||||
"phf_shared 0.10.0",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
]
|
||||
|
||||
|
@ -3137,11 +3160,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.99"
|
||||
version = "1.0.102"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
|
||||
checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
@ -3212,7 +3235,7 @@ dependencies = [
|
|||
"scopeguard",
|
||||
"serde",
|
||||
"unicode-segmentation",
|
||||
"uuid 1.1.2",
|
||||
"uuid 1.2.1",
|
||||
"windows 0.39.0",
|
||||
"windows-implement",
|
||||
"x11-dl",
|
||||
|
@ -3270,7 +3293,7 @@ dependencies = [
|
|||
"thiserror",
|
||||
"tokio",
|
||||
"url",
|
||||
"uuid 1.1.2",
|
||||
"uuid 1.2.1",
|
||||
"webkit2gtk",
|
||||
"webview2-com",
|
||||
"windows 0.39.0",
|
||||
|
@ -3304,7 +3327,7 @@ dependencies = [
|
|||
"json-patch",
|
||||
"plist",
|
||||
"png 0.17.6",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"semver 1.0.14",
|
||||
"serde",
|
||||
|
@ -3313,7 +3336,7 @@ dependencies = [
|
|||
"tauri-utils",
|
||||
"thiserror",
|
||||
"time",
|
||||
"uuid 1.1.2",
|
||||
"uuid 1.2.1",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
|
@ -3324,9 +3347,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "d6051fd6940ddb22af452340d03c66a3e2f5d72e0788d4081d91e31528ccdc4d"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
"tauri-codegen",
|
||||
"tauri-utils",
|
||||
]
|
||||
|
@ -3347,7 +3370,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"tauri-utils",
|
||||
"thiserror",
|
||||
"uuid 1.1.2",
|
||||
"uuid 1.2.1",
|
||||
"webview2-com",
|
||||
"windows 0.39.0",
|
||||
]
|
||||
|
@ -3365,7 +3388,7 @@ dependencies = [
|
|||
"raw-window-handle",
|
||||
"tauri-runtime",
|
||||
"tauri-utils",
|
||||
"uuid 1.1.2",
|
||||
"uuid 1.2.1",
|
||||
"webkit2gtk",
|
||||
"webview2-com",
|
||||
"windows 0.39.0",
|
||||
|
@ -3387,7 +3410,7 @@ dependencies = [
|
|||
"kuchiki",
|
||||
"memchr",
|
||||
"phf 0.10.1",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"semver 1.0.14",
|
||||
"serde",
|
||||
|
@ -3447,22 +3470,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
|
|||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.35"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85"
|
||||
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.35"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783"
|
||||
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3496,11 +3519,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.14"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b"
|
||||
checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c"
|
||||
dependencies = [
|
||||
"itoa 1.0.3",
|
||||
"itoa 1.0.4",
|
||||
"libc",
|
||||
"num_threads",
|
||||
"time-macros",
|
||||
|
@ -3529,9 +3552,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
|||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.21.1"
|
||||
version = "1.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95"
|
||||
checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bytes",
|
||||
|
@ -3539,7 +3562,6 @@ dependencies = [
|
|||
"memchr",
|
||||
"mio",
|
||||
"num_cpus",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
|
@ -3554,9 +3576,9 @@ version = "1.8.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3570,9 +3592,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.36"
|
||||
version = "0.1.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307"
|
||||
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"pin-project-lite",
|
||||
|
@ -3582,20 +3604,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.22"
|
||||
version = "0.1.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2"
|
||||
checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.29"
|
||||
version = "0.1.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7"
|
||||
checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"valuable",
|
||||
|
@ -3614,12 +3636,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.15"
|
||||
version = "0.3.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b"
|
||||
checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"matchers",
|
||||
"nu-ansi-term",
|
||||
"once_cell",
|
||||
"regex",
|
||||
"sharded-slab",
|
||||
|
@ -3659,9 +3681,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
|
|||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.4"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
|
||||
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-normalization"
|
||||
|
@ -3710,9 +3732,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
|
|||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.1.2"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f"
|
||||
checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83"
|
||||
dependencies = [
|
||||
"getrandom 0.2.7",
|
||||
]
|
||||
|
@ -3783,9 +3805,9 @@ dependencies = [
|
|||
"bumpalo",
|
||||
"log",
|
||||
"once_cell",
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
@ -3817,9 +3839,9 @@ version = "0.2.83"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
@ -3905,9 +3927,9 @@ version = "0.6.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.43",
|
||||
"proc-macro2 1.0.46",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4018,7 +4040,7 @@ version = "0.39.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7"
|
||||
dependencies = [
|
||||
"syn 1.0.99",
|
||||
"syn 1.0.102",
|
||||
"windows-tokens",
|
||||
]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "cathode-tube"
|
||||
version = "0.0.1"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = ["AnActualEmerald"]
|
||||
license = "GPL-3.0-or-later"
|
||||
|
@ -27,20 +27,20 @@ lto = true
|
|||
codegen-units = 1
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.0.0", features = [] }
|
||||
tauri-build = { version = "1.1.1", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.0.0", features = ["cli", "dialog-all", "fs-create-dir", "fs-read-dir", "fs-read-file", "fs-write-file", "macos-private-api", "window-minimize", "window-set-max-size", "window-set-min-size", "window-unminimize"] }
|
||||
tauri = { version = "1.1.1", features = ["cli", "dialog-all", "fs-create-dir", "fs-read-dir", "fs-read-file", "fs-write-file", "macos-private-api", "window-minimize", "window-set-max-size", "window-set-min-size", "window-unminimize"] }
|
||||
cpal = { version = "0.14.0", features = ["jack"] }
|
||||
ray_format = {path = "../ray_format", version = "~0.1.0"}
|
||||
anyhow = "1.0.63"
|
||||
anyhow = "1.0.65"
|
||||
log = "0.4.17"
|
||||
env_logger = "0.9.0"
|
||||
env_logger = "0.9.1"
|
||||
rand = "0.8.5"
|
||||
tokio = { version = "1.21.0", features = ["full"] }
|
||||
image = "0.24.3"
|
||||
tokio = { version = "1.21.2", features = ["full"] }
|
||||
image = "0.24.4"
|
||||
base64-url = "1.4.13"
|
||||
toml = "0.5.9"
|
||||
notify = "5.0.0"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
use std::io::Cursor;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::Path;
|
||||
|
||||
use base64_url as base64;
|
||||
use image::ImageFormat;
|
||||
|
@ -9,7 +10,6 @@ use ray_format::Ray;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use tauri::api::dialog::blocking::FileDialogBuilder;
|
||||
use tauri::api::path::{cache_dir, home_dir, picture_dir};
|
||||
use tokio::fs;
|
||||
|
||||
const OBJ_URL: &'static str = "data:image/png;base64,";
|
||||
|
||||
|
@ -20,7 +20,7 @@ pub(crate) struct WebRay {
|
|||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub(crate) async fn open_image() -> Option<String> {
|
||||
pub(crate) fn open_image() -> Option<String> {
|
||||
let path = FileDialogBuilder::new()
|
||||
.add_filter("Images", &["png", "jpg"])
|
||||
.set_directory(picture_dir().unwrap_or_else(|| home_dir().unwrap()))
|
||||
|
@ -45,10 +45,10 @@ pub(crate) async fn open_ray() -> Option<WebRay> {
|
|||
.set_directory(home_dir()?)
|
||||
.pick_file()?;
|
||||
|
||||
load_ray(path).await
|
||||
load_ray(path)
|
||||
}
|
||||
|
||||
pub(crate) async fn load_ray(path: impl AsRef<Path>) -> Option<WebRay> {
|
||||
pub(crate) fn load_ray(path: impl AsRef<Path>) -> Option<WebRay> {
|
||||
let ray = Ray::load(path.as_ref()).ok()?;
|
||||
let mut frames = [String::new(), String::new(), String::new(), String::new()];
|
||||
let mut meta = HashMap::new();
|
||||
|
@ -74,7 +74,7 @@ pub(crate) async fn load_ray(path: impl AsRef<Path>) -> Option<WebRay> {
|
|||
}
|
||||
|
||||
fs::write(
|
||||
cache_dir().unwrap().join("last_selected"),
|
||||
cache_dir().unwrap().join("cathode").join("last_selected"),
|
||||
path.as_ref()
|
||||
.canonicalize()
|
||||
.unwrap()
|
||||
|
@ -82,7 +82,6 @@ pub(crate) async fn load_ray(path: impl AsRef<Path>) -> Option<WebRay> {
|
|||
.unwrap()
|
||||
.as_bytes(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
Some(WebRay { frames, meta })
|
||||
}
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
)]
|
||||
|
||||
use std::{
|
||||
path::Path,
|
||||
path::{Path, PathBuf},
|
||||
sync::{Arc, Mutex},
|
||||
thread::sleep,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use audio::monitor;
|
||||
use fs::WebRay;
|
||||
use log::{debug, error, trace, warn};
|
||||
use serde_json::Value;
|
||||
use tauri::{
|
||||
|
@ -30,22 +31,20 @@ struct MicThreshold(Arc<Mutex<f32>>);
|
|||
struct AudioLevel(Arc<Mutex<f32>>);
|
||||
struct BlinkInterval(Arc<Mutex<u64>>);
|
||||
struct CurrentConfig(Arc<Mutex<Config>>);
|
||||
|
||||
// struct LastImage(Option<Arc<Path>>);
|
||||
// struct LastRay(Arc<Mutex<Path>>);
|
||||
struct RayToLoad(Arc<Mutex<Option<PathBuf>>>);
|
||||
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
let threshold = Arc::new(Mutex::new(MIC_THRESHOLD));
|
||||
let level = Arc::new(Mutex::new(0.));
|
||||
let blink_interval = Arc::new(Mutex::new(1500));
|
||||
let mut ray = None;
|
||||
let ray = Arc::new(Mutex::new(None));
|
||||
|
||||
if let Some(d) = cache_dir() {
|
||||
use std::fs;
|
||||
if let Ok(s) = fs::read_to_string(d.join("cathode").join("last_selected")) {
|
||||
debug!("Found selected ray in cache");
|
||||
ray = Some(Path::new(&s).to_path_buf());
|
||||
*ray.lock().unwrap() = Some(Path::new(&s).to_path_buf());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +63,8 @@ fn main() {
|
|||
.manage(AudioLevel(level.clone()))
|
||||
.manage(BlinkInterval(blink_interval.clone()))
|
||||
.manage(CurrentConfig(current_conf.clone()))
|
||||
.setup(|app| {
|
||||
.manage(RayToLoad(ray.clone()))
|
||||
.setup(move |app| {
|
||||
let window = app.get_window("main").unwrap();
|
||||
tauri::async_runtime::spawn(async move {
|
||||
monitor(window, threshold, level).await;
|
||||
|
@ -75,7 +75,7 @@ fn main() {
|
|||
loop {
|
||||
if rand::random() {
|
||||
trace!("Blinking");
|
||||
if let Some(e) = window.emit("blink", "").err() {
|
||||
if let Some(e) = window.emit_all("blink", "").err() {
|
||||
warn!("Failed to emit blink event: {}", e);
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ fn main() {
|
|||
Ok(event) => {
|
||||
if let EventKind::Access(AccessKind::Close(_)) = event.kind {
|
||||
*config.lock().unwrap() = config::load_config();
|
||||
window.emit("reload-config", "").unwrap();
|
||||
window.emit_all("reload-config", "").unwrap();
|
||||
}
|
||||
}
|
||||
Err(e) => error!("error watching filesystem {:?}", e),
|
||||
|
@ -111,27 +111,17 @@ fn main() {
|
|||
}
|
||||
});
|
||||
|
||||
if let Ok(matches) = app.get_cli_matches() {
|
||||
if let Some(arg) = matches.args.get("file") {
|
||||
if let Value::String(path) = arg.value.clone() {
|
||||
let window = app.get_window("main").unwrap();
|
||||
let path = Path::new(&path).canonicalize().unwrap();
|
||||
tauri::async_runtime::spawn(async move {
|
||||
if let Some(ray) = fs::load_ray(Path::new(&path)).await {
|
||||
window.emit("load-ray", ray).unwrap();
|
||||
}
|
||||
});
|
||||
match app.get_cli_matches() {
|
||||
Ok(matches) => {
|
||||
trace!("matches OK");
|
||||
if let Some(arg) = matches.args.get("file") {
|
||||
trace!("CLI arg value: {:?}", arg);
|
||||
if let Value::String(path) = arg.value.clone() {
|
||||
*ray.lock().unwrap() = Some(PathBuf::from(path));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if let Some(r) = ray {
|
||||
let window = app.get_window("main").unwrap();
|
||||
tauri::async_runtime::spawn(async move {
|
||||
if let Some(ray) = fs::load_ray(r).await {
|
||||
window.emit("load-ray", ray).unwrap();
|
||||
}
|
||||
});
|
||||
}
|
||||
Err(e) => eprintln!("{}", e),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -144,6 +134,7 @@ fn main() {
|
|||
get_blink_interval,
|
||||
set_blink_interval,
|
||||
get_config,
|
||||
get_ray_to_load,
|
||||
fs::open_image,
|
||||
fs::save_ray,
|
||||
fs::open_ray,
|
||||
|
@ -152,9 +143,20 @@ fn main() {
|
|||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn get_ray_to_load(ray: State<'_, RayToLoad>) -> Option<WebRay> {
|
||||
let ray = { (*ray.0.lock().unwrap()).clone() };
|
||||
if let Some(r) = ray {
|
||||
let ray = fs::load_ray(r);
|
||||
ray
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn log(msg: String) {
|
||||
println!("{}", msg);
|
||||
debug!("frontend: {}", msg);
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
<script lang="ts">
|
||||
import MainView from "./views/main.svelte";
|
||||
import {appWindow} from "@tauri-apps/api/window";
|
||||
import {listen} from "@tauri-apps/api/event";
|
||||
import {invoke} from "@tauri-apps/api";
|
||||
import {onMount} from "svelte";
|
||||
import {config} from "./store";
|
||||
import type {Config, BGColor} from "./store";
|
||||
import type {Config} from "./store";
|
||||
|
||||
$: transparent = $config.background_color == "transparent";
|
||||
$: color = typeof $config.background_color == "object" ? $config.background_color.custom : $config.background_color;
|
||||
$: transparent = $config.background_color === "transparent";
|
||||
$: color = typeof $config.background_color === "object" ? $config.background_color.custom : $config.background_color;
|
||||
$: {
|
||||
invoke("set_blink_interval", {value: $config.blink_interval}).catch();
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
|||
|
||||
|
||||
onMount(async () => {
|
||||
// $config = await invoke("get_config") as Config;
|
||||
await appWindow.listen("reload-config", async () => {
|
||||
$config = await invoke("get_config") as Config;
|
||||
await listen("reload-config", async () => {
|
||||
$config = await invoke("get_config") as Config;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import {writable} from "svelte/store";
|
||||
import {invoke} from "@tauri-apps/api";
|
||||
export type BGColor ="transparent" | "blue" | "green" | "pink" | {custom: string} ;
|
||||
|
||||
export class Config {
|
||||
|
@ -12,8 +11,7 @@ export class Config {
|
|||
}
|
||||
}
|
||||
|
||||
const conf = await invoke("get_config") as Config;
|
||||
|
||||
|
||||
export let frames = writable(new Array<string>(4));
|
||||
export let config = writable(conf);
|
||||
export let config = writable(new Config());
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { appWindow, PhysicalSize } from "@tauri-apps/api/window";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
import { fly } from "svelte/transition";
|
||||
import FramePreview from "../components/FramePreview.svelte";
|
||||
|
@ -24,6 +25,7 @@
|
|||
import { tick } from "svelte";
|
||||
import { frames } from "../store";
|
||||
import { quintInOut } from "svelte/easing";
|
||||
import type { UnlistenFn } from "@tauri-apps/api/event";
|
||||
|
||||
let monitorTimer: NodeJS.Timer;
|
||||
|
||||
|
@ -40,6 +42,7 @@
|
|||
}
|
||||
|
||||
const openRay = (ray: WebRay) => {
|
||||
invoke("log", {msg: "Load ray"}).then().catch();
|
||||
for (let i = 0; i < 4; i++) {
|
||||
$frames[i] = ray.frames[i];
|
||||
}
|
||||
|
@ -50,16 +53,16 @@
|
|||
closeThreshold = parseFloat(ray.meta.closeThreshold);
|
||||
}
|
||||
};
|
||||
|
||||
let focusUnlisten: UnlistenFn;
|
||||
|
||||
onMount(async () => {
|
||||
await appWindow.setMinSize(new PhysicalSize(720, 600));
|
||||
|
||||
await appWindow.onFocusChanged(({ payload: focused }) => {
|
||||
focusUnlisten = await appWindow.onFocusChanged(({ payload: focused }) => {
|
||||
$transparent = !focused;
|
||||
});
|
||||
|
||||
await appWindow.listen("load-ray", (e) => {
|
||||
openRay(e.payload as WebRay);
|
||||
});
|
||||
|
||||
monitorTimer = setInterval(async () => {
|
||||
if (!$transparent) {
|
||||
|
@ -69,6 +72,11 @@
|
|||
}, 40);
|
||||
|
||||
$threshold = await invoke("get_mic_threshold");
|
||||
|
||||
const ray = await invoke("get_ray_to_load");
|
||||
if(ray) {
|
||||
openRay(ray as WebRay);
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
|
@ -76,6 +84,9 @@
|
|||
clearInterval(monitorTimer);
|
||||
monitorTimer = undefined;
|
||||
}
|
||||
|
||||
|
||||
if (focusUnlisten) focusUnlisten();
|
||||
});
|
||||
|
||||
const saveRay = async () => {
|
||||
|
@ -165,7 +176,9 @@
|
|||
}}
|
||||
class="buttons"
|
||||
>
|
||||
<!-- svelte-ignore a11y-visible -->
|
||||
<div on:click={saveRay}>Save</div>
|
||||
<!-- svelte-ignore a11y-mouse-events-have-key-events-->
|
||||
<div on:click={loadRay}>Load</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue