diff --git a/Cargo.lock b/Cargo.lock index 91ab3bce1fc1b571146ea915c9ec5ea82035bb06..a3784d9762d8df41af068e955587ac6cde999eef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1061f3ff92c2f65800df1f12fc7b4ff44ee14783104187dd04dfee6f11b0fd2" +checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -197,20 +197,40 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", + "polling 2.8.0", "rustix 0.37.27", "slab", "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +dependencies = [ + "async-lock 3.0.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.0", + "rustix 0.38.21", + "slab", + "tracing", + "waker-fn", + "windows-sys 0.48.0", +] + [[package]] name = "async-lock" version = "2.8.0" @@ -220,19 +240,30 @@ dependencies = [ "event-listener 2.5.3", ] +[[package]] +name = "async-lock" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e900cdcd39bb94a14487d3f7ef92ca222162e6c7c3fe7cb3550ea75fb486ed" +dependencies = [ + "event-listener 3.0.1", + "event-listener-strategy", + "pin-project-lite", +] + [[package]] name = "async-process" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "async-signal", "blocking", "cfg-if", - "event-listener 3.0.0", - "futures-lite", + "event-listener 3.0.1", + "futures-lite 1.13.0", "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -245,17 +276,17 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "async-signal" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a5415b7abcdc9cd7d63d6badba5288b2ca017e3fbd4173b8f405449f1a2399" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io", - "async-lock", + "async-io 2.2.0", + "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", @@ -280,7 +311,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -353,7 +384,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -451,11 +482,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" dependencies = [ "async-channel", - "async-lock", + "async-lock 2.8.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "piper", "tracing", ] @@ -483,7 +514,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -585,7 +616,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -930,7 +961,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -961,9 +992,9 @@ dependencies = [ [[package]] name = "etagere" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf22f748754352918e082e0039335ee92454a5d62bcaf69b5e8daf5907d9644" +checksum = "5bf70b9ea3a235a7432b4f481854815e2d4fb2fe824c1f5fb09b8985dd06b3e9" dependencies = [ "euclid", "svg_fmt", @@ -986,15 +1017,25 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +dependencies = [ + "event-listener 3.0.1", + "pin-project-lite", +] + [[package]] name = "exr" version = "1.6.4" @@ -1034,9 +1075,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" dependencies = [ "simd-adler32", ] @@ -1080,7 +1121,7 @@ dependencies = [ "memmap2 0.6.2", "slotmap", "tinyvec", - "ttf-parser", + "ttf-parser 0.19.2", ] [[package]] @@ -1171,6 +1212,16 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -1179,7 +1230,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1694,9 +1745,9 @@ dependencies = [ [[package]] name = "iced_winit" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ecea26fcc8074373f6011d2193d63445617d900a428eb4df66c0e5658408fb6" +checksum = "ad0c884bcb14722a57192b40a5ef6b5e170fa2f01fe2ff28d6cdd9efe37acf70" dependencies = [ "iced_graphics", "iced_runtime", @@ -1752,9 +1803,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.2", @@ -1821,9 +1872,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -1950,7 +2001,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2008,9 +2059,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -2038,6 +2089,28 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2422,7 +2495,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2513,11 +2586,11 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" dependencies = [ - "redox_syscall 0.3.5", + "libredox 0.0.2", ] [[package]] @@ -2532,11 +2605,11 @@ dependencies = [ [[package]] name = "owned_ttf_parser" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" +checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" dependencies = [ - "ttf-parser", + "ttf-parser 0.20.0", ] [[package]] @@ -2559,7 +2632,7 @@ checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2652,7 +2725,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2681,7 +2754,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2742,6 +2815,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.21", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2920,12 +3007,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox 0.0.1", "thiserror", ] @@ -3110,7 +3197,7 @@ dependencies = [ "bytemuck", "libm", "smallvec", - "ttf-parser", + "ttf-parser 0.19.2", "unicode-bidi-mirroring", "unicode-ccc", "unicode-general-category", @@ -3160,31 +3247,31 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -3202,13 +3289,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3455,9 +3542,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3564,7 +3651,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3671,7 +3758,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3711,15 +3798,15 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.7", + "toml_edit 0.21.0", ] [[package]] @@ -3737,18 +3824,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "toml_datetime", "winnow", ] [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -3801,7 +3888,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3825,6 +3912,12 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + [[package]] name = "twox-hash" version = "1.6.3" @@ -3973,9 +4066,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3983,24 +4076,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -4010,9 +4103,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4020,22 +4113,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-timer" @@ -4177,9 +4270,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -4544,9 +4637,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] @@ -4709,22 +4802,22 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" [[package]] name = "zerocopy" -version = "0.7.18" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7d7c7970ca2215b8c1ccf4d4f354c4733201dfaaba72d44ae5b37472e4901" +checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.18" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b27b1bb92570f989aac0ab7e9cbfbacdd65973f7ee920d9f0e71ebac878fd0b" +checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 61c9d187da62433bab49129dd7c48fd5a323cc57..240d3d4d8132ab9f32f17323474a990397fa9389 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ authors = [ "Kevin COCCHI <salixor@pm.me>", "Félix GOUEDARD <felix.gouedard@ensiie.fr>", "Hubert HIRTZ <hubert.hirtz@laposte.net>", + "Thien An CAO <cthienan94@gmail.com>", "Étienne BRATEAU <etienne.brateau@gmail.com>", "Tristan DEROUET <tristan.derouet@gmail.com>", ] @@ -80,6 +81,7 @@ futures = { version = "0.3", default-features = false, features = [ tokio = { version = "1", default-features = false, features = [ "macros", "rt-multi-thread", + "sync", "fs", "signal", ] } diff --git a/amadeus/src/app.rs b/amadeus/src/app.rs index d5c135efc6e31ad83a5f373de88864aee4013abe..852ca543ce33774346616d240abea45e2f5af740 100644 --- a/amadeus/src/app.rs +++ b/amadeus/src/app.rs @@ -723,13 +723,11 @@ impl Application for Amadeus { Command::none() } Message::ChangedKaraId(kid) => { - let store = self.kara_store.clone(); - Command::perform(KaraStore::into_get(store, kid), |res| match res { - Ok(kara) => Message::ChangedKara(kara), - Err(err) => { + Command::perform(KaraStore::into_get(self.kara_store.clone(), kid), |res| { + res.map(Message::ChangedKara).unwrap_or_else(|err| { log::error!("{err}"); Message::ChangedPlayback(PlayState::Stop) - } + }) }) } Message::ChangedKara(kara) => { diff --git a/lektor_utils/build.rs b/lektor_utils/src/git_version.rs similarity index 55% rename from lektor_utils/build.rs rename to lektor_utils/src/git_version.rs index 2bc9b0e45b0582917ef430d4215e9e962e4bfb83..d4ffb5ef064ed6ef5969836b46052b97f59b5242 100644 --- a/lektor_utils/build.rs +++ b/lektor_utils/src/git_version.rs @@ -1,14 +1,8 @@ -use std::{ - env::var_os, - fs, - path::Path, - process::{Command, Stdio}, -}; - -fn main() { - let out_dir = var_os("OUT_DIR").expect("failed to get OUT_DIR"); - let src_file = Path::new(&out_dir).join("commons_build_infos.rs"); +use std::process::{Command, Stdio}; +/// Get the version by calling git, if git failed or the output is incorrect we will panic. This +/// function is intended to be called from build.rs scripts as we need access to the git folder. +pub fn git_version() -> String { let output = Command::new("git") .args(["describe", "--abbrev=1", "--tags", "--dirty=-dirty"]) .stdout(Stdio::piped()) @@ -16,7 +10,7 @@ fn main() { .expect("failed to run git to describe the git repo") .wait_with_output() .expect("failed to wait for git describe command..."); - let version = match String::from_utf8(output.stdout) + match String::from_utf8(output.stdout) .expect("git didn't return a correct UTF8 string") .trim() .split('-') @@ -27,14 +21,5 @@ fn main() { [tag, post, hash] => format!("{tag}.post{post}+{hash}"), [tag, post, hash, dirty] => format!("{tag}.post{post}+{hash}-{dirty}"), _ => panic!(), - }; - - let build_infos = format!( - r#" -pub const fn version() -> &'static str {{ "{version}" }} - "# - ); - - fs::write(src_file, build_infos).expect("failed to write the build info file"); - println!("cargo:rerun-if-changed=build.rs"); + } } diff --git a/lektor_utils/src/lib.rs b/lektor_utils/src/lib.rs index 0f98c69861f423628dbe247036f60b61dcfe4b44..c17d9cf6847a615f5907fd1017830116f92d09ef 100644 --- a/lektor_utils/src/lib.rs +++ b/lektor_utils/src/lib.rs @@ -1,8 +1,10 @@ pub use base64::*; +pub use git_version::*; pub use iterator::*; mod asserts; mod base64; +mod git_version; mod iterator; mod macros; @@ -31,8 +33,6 @@ pub mod logger; pub mod open; pub mod pushvec; -include!(concat!(env!("OUT_DIR"), "/commons_build_infos.rs")); - /// Returns the home folder of the user. If no home folder is found log the /// error and panic. pub fn user_home_directory() -> std::path::PathBuf { diff --git a/lektord/Cargo.toml b/lektord/Cargo.toml index 79a6ffe14872327d36831da1bf5359b7123569da..b5c77dff441279ac718ffc4cde4477a3c3569635 100644 --- a/lektord/Cargo.toml +++ b/lektord/Cargo.toml @@ -30,3 +30,4 @@ lektor_payloads = { path = "../lektor_payloads" } [build-dependencies] anyhow.workspace = true +lektor_utils = { path = "../lektor_utils" } diff --git a/lektord/build.rs b/lektord/build.rs index b6c0b3ac53aa75ddff4212611d210b86550ae0f7..eb01e8cce5495cd9aa2afcc6e7bb20afbadcf500 100644 --- a/lektord/build.rs +++ b/lektord/build.rs @@ -44,8 +44,11 @@ fn is_dylib(ext: &OsStr) -> bool { } fn main() -> anyhow::Result<()> { + let git_version = lektor_utils::git_version(); let mut version = OsString::from("LKT_VERSION="); version.push(OsStr::new(env!("CARGO_PKG_VERSION"))); + let out_dir = std::env::var_os("OUT_DIR").expect("failed to get OUT_DIR"); + let src_file = Path::new(&out_dir).join("lektord_build_infos.rs"); let (mut build, source) = (from_root(".build"), from_root("lektord/c")); let cmake_opts = match std::env::var_os("CXX") { @@ -104,11 +107,17 @@ fn main() -> anyhow::Result<()> { target_file.set_extension(ext); std::fs::copy(&path, target_file).expect("failed to copy the lektor_c dynamic library"); + let build_infos = format!( + r#" +pub const fn version() -> &'static str {{ "{git_version}" }} + "# + ); + std::fs::write(src_file, build_infos).expect("failed to write the build info file"); + println!("cargo:rustc-link-search={}", &lib[..from]); println!("cargo:rustc-link-lib=dylib={}", &libfile[..to]); println!("cargo:rustc-link-arg=-Wl,-rpath=$ORIGIN"); println!("cargo:rerun-if-changed={}", source.to_string_lossy()); - // println!("cargo:rerun-if-changed={}", build.to_string_lossy()); Ok(()) } diff --git a/lektord/c/common.h b/lektord/c/common.h index c24b3a095354278b325410fb24e527e0bfdcb07d..36f66466873f9ed0ed9a9468ca71a833fe64aabf 100644 --- a/lektord/c/common.h +++ b/lektord/c/common.h @@ -149,7 +149,7 @@ DLL_IMPORT EXIT_FUNCTION ___lkt_abort(void); #ifdef abort #undef abort #endif -#define abort() ___lkt_abort() +#define abort() ___lkt_abort() #define lkt_abort() ___lkt_abort() } diff --git a/lektord/src/app/mod.rs b/lektord/src/app/mod.rs index 3204f3b3e31e266fbf92887185252c127ea38fb9..74cfc9dd26de33342af7a7bb7b9c8d9fbb69596f 100644 --- a/lektord/src/app/mod.rs +++ b/lektord/src/app/mod.rs @@ -2,8 +2,8 @@ #![forbid(unsafe_code)] -mod routes; mod mpris; +mod routes; use crate::LektorConfig; use anyhow::{anyhow, Context, Result}; diff --git a/lektord/src/app/routes.rs b/lektord/src/app/routes.rs index a3149088d9cd09a32cb56a6366f7863e87dc53a8..5b8d0d9b79871c2235437f133bb1f296fc267d2a 100644 --- a/lektord/src/app/routes.rs +++ b/lektord/src/app/routes.rs @@ -24,7 +24,7 @@ use tokio::task::LocalSet; /// Get informations abount the lektord server. pub(crate) async fn root(State(state): State<LektorStatePtr>) -> Json<Infos> { Json(Infos { - version: lektor_utils::version().to_string(), + version: crate::version().to_string(), last_epoch: state.database.last_epoch_num().await, }) } diff --git a/lektord/src/cmd.rs b/lektord/src/cmd.rs index 144e395852cf3c2710d298d226bece4f63894bf4..b679ea2354d95fe277b83f8346995b0a61ab6463 100644 --- a/lektord/src/cmd.rs +++ b/lektord/src/cmd.rs @@ -1,9 +1,8 @@ use clap::{Parser, Subcommand}; -use lektor_utils::*; #[derive(Parser, Debug, Default)] #[command( author - , version = version() + , version = crate::version() , about , long_about = None , disable_help_subcommand = false diff --git a/lektord/src/main.rs b/lektord/src/main.rs index bad93de720ed4655c010a2ea8f1fde038983b17e..1c698749fe2508faed212daf9038ee8b20b20b59 100644 --- a/lektord/src/main.rs +++ b/lektord/src/main.rs @@ -5,8 +5,9 @@ mod config; mod error; mod listen; -pub use self::{app::*, config::*, error::*, listen::*}; +include!(concat!(env!("OUT_DIR"), "/lektord_build_infos.rs")); +use crate::{app::*, config::*, error::*, listen::*}; use anyhow::{Context, Result}; use cmd::SubCommand; use lektor_utils::*; diff --git a/lkt/Cargo.toml b/lkt/Cargo.toml index 88681dfe93c97b66e6f91189a14c53db59b0eeba..3b675b920b06567fa20dcd659a5e8ce8c7d015b6 100644 --- a/lkt/Cargo.toml +++ b/lkt/Cargo.toml @@ -26,3 +26,7 @@ clap_complete.workspace = true lektor_lib = { path = "../lektor_lib" } lektor_utils = { path = "../lektor_utils" } lektor_payloads = { path = "../lektor_payloads" } + +[build-dependencies] +anyhow.workspace = true +lektor_utils = { path = "../lektor_utils" } diff --git a/lkt/build.rs b/lkt/build.rs new file mode 100644 index 0000000000000000000000000000000000000000..aab7a468a625a7ffca75be49919b9483676e929e --- /dev/null +++ b/lkt/build.rs @@ -0,0 +1,16 @@ +use std::path::Path; + +fn main() -> anyhow::Result<()> { + let git_version = lektor_utils::git_version(); + let out_dir = std::env::var_os("OUT_DIR").expect("failed to get OUT_DIR"); + let src_file = Path::new(&out_dir).join("lkt_build_infos.rs"); + + let build_infos = format!( + r#" +pub const fn version() -> &'static str {{ "{git_version}" }} + "# + ); + std::fs::write(src_file, build_infos).expect("failed to write the build info file"); + + Ok(()) +} diff --git a/lkt/src/args/mod.rs b/lkt/src/args/mod.rs index 5138144a79240e309eae7acf10b89f8c743ea9cc..e4831946cb44c1bbef1e3aa2cc516eaa91fa6b06 100644 --- a/lkt/src/args/mod.rs +++ b/lkt/src/args/mod.rs @@ -2,11 +2,10 @@ mod parsers; use clap::{Parser, Subcommand}; use clap_complete::Shell; -use lektor_utils::*; #[derive(Parser, Debug)] #[command( author - , version = version() + , version = crate::version() , about , long_about = None , disable_help_subcommand = false diff --git a/lkt/src/main.rs b/lkt/src/main.rs index 0f244fe5ea097b5e12150b665f187dcb1e4068cf..4d550b13e27a88d1eaa268bc794d8d6b79b49f52 100644 --- a/lkt/src/main.rs +++ b/lkt/src/main.rs @@ -1,5 +1,7 @@ #![forbid(unsafe_code)] +include!(concat!(env!("OUT_DIR"), "/lkt_build_infos.rs")); + mod args; mod config; mod manpage; diff --git a/utils/scripts/style.bash b/utils/scripts/style.bash index 4fbad8ddf6a97ad5e132a68fa6f1d10f3a077322..47aaccfd44579e9f33c388fd825b593b16419c87 100755 --- a/utils/scripts/style.bash +++ b/utils/scripts/style.bash @@ -1,6 +1,4 @@ #!/bin/sh set -e -_ROOT="$(git rev-parse --show-toplevel)" -cd "$_ROOT" -find ./src \( -name '*.cpp' -o -name '*.cc' -o -name '*.c' -o -name '*.h' -o -name '*.hh' -o -name '*.hpp' \) -exec clang-format -i {} \; -find ./inc \( -name '*.h' -o -name '*.hh' -o -name '*.hpp' \) -exec clang-format -i {} \; +cd "$(git rev-parse --show-toplevel)/lektord/c" +find . \( -name '*.cpp' -o -name '*.cc' -o -name '*.c' -o -name '*.h' -o -name '*.hh' -o -name '*.hpp' \) -exec clang-format -i {} \;