From 094577d277db5cea19bfa33b15f4816ac844013e Mon Sep 17 00:00:00 2001 From: Cococry Date: Fri, 31 Jul 2026 09:35:16 +0200 Subject: [PATCH] ci: fixed faith-ui CI --- CONTRIBUTING.md | 2 +- faith-ui/Cargo.lock | 286 +++++++++++++++--------- faith-ui/src/graphics/device.rs | 1 + faith-ui/src/graphics/image.rs | 2 + faith-ui/src/graphics/opengl/backend.rs | 1 + faith-ui/src/graphics/opengl/mod.rs | 1 + faith-ui/src/graphics/vulkan/backend.rs | 4 + faith-ui/src/graphics/vulkan/mod.rs | 1 + faith-ui/src/main.rs | 25 ++- faith-ui/src/ui/renderer.rs | 9 +- faith-ui/src/ui/text.rs | 14 +- 11 files changed, 230 insertions(+), 116 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cdb9028..95ab209 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ git checkout -b my-change Before committing, run the local check script: ```console -./check.sh +./scripts/check.sh ``` This runs the same kind of checks used by CI, including formatting, Clippy and tests. Please fix any errors before opening a pull request. diff --git a/faith-ui/Cargo.lock b/faith-ui/Cargo.lock index 9591aa9..1166059 100644 --- a/faith-ui/Cargo.lock +++ b/faith-ui/Cargo.lock @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "arbitrary" @@ -111,14 +111,14 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "arrayvec" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" [[package]] name = "as-raw-xcb-connection" @@ -216,9 +216,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" [[package]] name = "bitstream-io" @@ -243,22 +243,22 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytemuck" -version = "1.25.0" +version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +checksum = "f65693059b6b9c588b9f62fed1cedbf0a8b805631457ea162d68f0de186f3de5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -269,9 +269,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "cc" -version = "1.2.65" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" dependencies = [ "find-msvc-tools", "jobserver", @@ -287,15 +287,15 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "clap" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "d91e0c145792ef73a6ad36d27c75ac09f1832222a3c209689d90f534685ee5b7" dependencies = [ "clap_builder", "clap_derive", @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" dependencies = [ "anstream", "anstyle", @@ -315,14 +315,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] @@ -415,9 +415,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -425,18 +425,18 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crunchy" @@ -461,9 +461,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "either" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" [[package]] name = "equator" @@ -482,7 +482,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -503,14 +503,16 @@ dependencies = [ [[package]] name = "exr" -version = "1.74.0" +version = "1.74.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" +checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" dependencies = [ "bit_field", "half", "lebe", "miniz_oxide", + "num-complex", + "pulp", "rayon-core", "smallvec", "zune-inflate", @@ -613,7 +615,7 @@ version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d228d6de56c90dd7585341f341849441b3490180c62d27133e525eb726809b4" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "freetype-sys", "libc", ] @@ -631,21 +633,21 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures-core", "futures-task", @@ -671,10 +673,21 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", ] +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + [[package]] name = "gif" version = "0.14.2" @@ -797,7 +810,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -817,11 +830,11 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom", + "getrandom 0.4.3", "libc", ] @@ -860,9 +873,9 @@ checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libfuzzer-sys" @@ -894,6 +907,12 @@ dependencies = [ "windows-link", ] +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + [[package]] name = "libz-sys" version = "1.1.29" @@ -929,9 +948,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a860605968fce16869fd239cf4237a82f3ac470723415db603b0e8b6c8d4fb9" +checksum = "0b6180140927ee907000b0aa540091f6ea512ead4447c92b8fc35bc72788a5a6" dependencies = [ "hashbrown", ] @@ -957,9 +976,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "miniz_oxide" @@ -993,7 +1012,7 @@ version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "cfg-if", "cfg_aliases", "libc", @@ -1034,14 +1053,24 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" dependencies = [ "num-integer", "num-traits", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", +] + [[package]] name = "num-derive" version = "0.4.2" @@ -1050,7 +1079,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -1124,7 +1153,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "crc32fast", "fdeflate", "flate2", @@ -1142,9 +1171,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -1165,14 +1194,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" dependencies = [ "quote", - "syn", + "syn 2.0.119", ] +[[package]] +name = "pulp" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" +dependencies = [ + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" + [[package]] name = "pxfm" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" [[package]] name = "qoi" @@ -1191,18 +1243,18 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.39.4" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -1213,11 +1265,17 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ "rand_chacha", "rand_core", @@ -1239,7 +1297,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom", + "getrandom 0.3.4", ] [[package]] @@ -1292,6 +1350,15 @@ dependencies = [ "rgb", ] +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.1", +] + [[package]] name = "rayon" version = "1.12.0" @@ -1312,11 +1379,17 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" dependencies = [ "aho-corasick", "memchr", @@ -1350,7 +1423,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "errno", "libc", "linux-raw-sys", @@ -1359,9 +1432,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "scoped-tls" @@ -1407,9 +1480,9 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" [[package]] name = "simd_helpers" @@ -1455,9 +1528,20 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -1466,29 +1550,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] name = "thread_local" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" dependencies = [ "cfg-if", ] @@ -1526,7 +1610,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -1634,7 +1718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d7ba61d9155d2a6eb77693f6e83953c392cda219d2882fb0a95f781c5eb06ec" dependencies = [ "ash 0.38.0+1.3.281", - "bitflags 2.13.0", + "bitflags 2.13.1", "cc", ] @@ -1690,7 +1774,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.119", "wasm-bindgen-shared", ] @@ -1705,9 +1789,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2857dd20b54e916ec7253b3d6b4d5c4d7d4ca2c33c2e11c6c76a99bd8744755d" +checksum = "016ccf01d1c58b6f8999612813e17c9b2390f7d70671428869913310f83f54b8" dependencies = [ "cc", "downcast-rs", @@ -1719,11 +1803,11 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.14" +version = "0.31.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "rustix", "wayland-backend", "wayland-scanner", @@ -1745,7 +1829,7 @@ version = "0.32.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "wayland-backend", "wayland-client", "wayland-scanner", @@ -1753,9 +1837,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.10" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c324a910fd86ebdc364a3e61ec1f11737d3b1d6c273c0239ee8ff4bc0d24b4a" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" dependencies = [ "proc-macro2", "quick-xml", @@ -1875,22 +1959,22 @@ checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" [[package]] name = "zerocopy" -version = "0.8.52" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.52" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] diff --git a/faith-ui/src/graphics/device.rs b/faith-ui/src/graphics/device.rs index d2c3fb0..c84c388 100644 --- a/faith-ui/src/graphics/device.rs +++ b/faith-ui/src/graphics/device.rs @@ -224,6 +224,7 @@ pub trait GraphicsDevice { /// Creates a 2D texture and optionally uploads /// initial pixel data. + #[allow(dead_code)] fn create_texture( &mut self, desc: TextureDesc, diff --git a/faith-ui/src/graphics/image.rs b/faith-ui/src/graphics/image.rs index 4c1ff58..0fe7411 100644 --- a/faith-ui/src/graphics/image.rs +++ b/faith-ui/src/graphics/image.rs @@ -4,6 +4,7 @@ use std::path::Path; /// /// Pixels are stored as 8-bit RGBA values in row-major order, with four bytes /// per pixel: red, green, blue, and alpha. +#[allow(dead_code)] pub struct ImageData { pub width: u32, pub height: u32, @@ -16,6 +17,7 @@ impl ImageData { /// /// The returned image data always contains four 8-bit channels per pixel: /// red, green, blue, and alpha. + #[allow(dead_code)] pub fn load_rgba8(path: impl AsRef) -> anyhow::Result { let path = path.as_ref(); diff --git a/faith-ui/src/graphics/opengl/backend.rs b/faith-ui/src/graphics/opengl/backend.rs index 71643d2..a46013a 100644 --- a/faith-ui/src/graphics/opengl/backend.rs +++ b/faith-ui/src/graphics/opengl/backend.rs @@ -404,6 +404,7 @@ impl OpenGLRenderer { } } + #[allow(dead_code)] pub fn create_texture( &mut self, desc: TextureDesc, diff --git a/faith-ui/src/graphics/opengl/mod.rs b/faith-ui/src/graphics/opengl/mod.rs index a170eb4..5962424 100644 --- a/faith-ui/src/graphics/opengl/mod.rs +++ b/faith-ui/src/graphics/opengl/mod.rs @@ -13,6 +13,7 @@ struct GlBuffer { /// Type of OpenGL texture resource. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum GlTextureKind { + #[allow(dead_code)] Texture2D, Texture2DArray, } diff --git a/faith-ui/src/graphics/vulkan/backend.rs b/faith-ui/src/graphics/vulkan/backend.rs index 25c1067..294c14b 100644 --- a/faith-ui/src/graphics/vulkan/backend.rs +++ b/faith-ui/src/graphics/vulkan/backend.rs @@ -2979,6 +2979,7 @@ impl VulkanRenderer { Ok(()) } + #[allow(dead_code)] pub fn create_texture( &mut self, desc: TextureDesc, @@ -3242,6 +3243,7 @@ impl VulkanRenderer { Ok(()) } + #[allow(dead_code)] fn write_texture_recorded( &mut self, texture: TextureHandle, @@ -3412,6 +3414,7 @@ impl VulkanRenderer { Ok(()) } + #[allow(dead_code)] pub fn write_texture( &mut self, texture: TextureHandle, @@ -3439,6 +3442,7 @@ impl VulkanRenderer { Ok(()) } + #[allow(dead_code)] fn destroy_texture(&mut self, handle: TextureHandle) -> anyhow::Result<()> { let mut texture = self .textures diff --git a/faith-ui/src/graphics/vulkan/mod.rs b/faith-ui/src/graphics/vulkan/mod.rs index 0ee1c43..460ea79 100644 --- a/faith-ui/src/graphics/vulkan/mod.rs +++ b/faith-ui/src/graphics/vulkan/mod.rs @@ -29,6 +29,7 @@ pub struct VulkanPipeline { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum VulkanTextureKind { + #[allow(dead_code)] Texture2D, Texture2DArray, } diff --git a/faith-ui/src/main.rs b/faith-ui/src/main.rs index e49f7dc..6bbe724 100644 --- a/faith-ui/src/main.rs +++ b/faith-ui/src/main.rs @@ -3,7 +3,7 @@ mod graphics; mod platform; mod ui; -use crate::{graphics::GraphicsDevice, ui::{TextRenderer, text::TextLayoutOptions}}; +use crate::{graphics::GraphicsDevice, ui::TextRenderer}; use clap::Parser; use cli::Cli; @@ -46,7 +46,6 @@ fn main() -> anyhow::Result<()> { text.load_font("assets/NotoSansArabic-Regular.ttf", 24)?; text.load_font("assets/NotoSansHebrew-Regular.ttf", 24)?; - let mut running = true; while running { @@ -81,7 +80,8 @@ fn main() -> anyhow::Result<()> { ui.begin(width, height); text.render( - 50.0, 50.0, + 50.0, + 50.0, "Faith Instant Messaging", bold_font, &mut renderer, @@ -89,23 +89,28 @@ fn main() -> anyhow::Result<()> { )?; let dim1 = text.measure("❌️", base_font)?; - text.render(width as f32 - dim1.width - 50.0, 50.0, "❌️", base_font, &mut renderer, &mut ui)?; + text.render( + width as f32 - dim1.width - 50.0, + 50.0, + "❌️", + base_font, + &mut renderer, + &mut ui, + )?; - let dim = text.measure("Send message", base_font)?; + let dim = text.measure("Send message", base_font)?; println!("{}x{}", dim.width, dim.height); - text.render( - (width as f32 - dim.width) / 2.0, height as f32 - dim.height - 50.0, + text.render( + (width as f32 - dim.width) / 2.0, + height as f32 - dim.height - 50.0, "Send message", base_font, &mut renderer, &mut ui, )?; - - ui.end(&mut renderer)?; renderer.end_frame()?; - } } Ok(()) diff --git a/faith-ui/src/ui/renderer.rs b/faith-ui/src/ui/renderer.rs index 79870ad..97f27a8 100644 --- a/faith-ui/src/ui/renderer.rs +++ b/faith-ui/src/ui/renderer.rs @@ -50,6 +50,7 @@ pub enum ImageStorage { #[derive(Debug, Clone, Copy)] pub struct Image { pub storage: ImageStorage, + #[allow(dead_code)] pub size: [u32; 2], } @@ -428,6 +429,7 @@ impl UIRenderer { /// /// Consecutive quads using the same dedicated /// texture are batched into one draw range. + #[allow(dead_code)] pub fn raw_quad_dedicated( &mut self, texture_handle: TextureHandle, @@ -484,8 +486,9 @@ impl UIRenderer { /// /// The image is rendered using its original /// loaded size and full white tint. + #[allow(dead_code)] pub fn image(&mut self, x: f32, y: f32, w: f32, h: f32, image: Image) -> anyhow::Result<()> { - self.image_tined(x, y, w, h, image, Color::rgba(1.0, 1.0, 1.0, 1.0)) + self.image_tinted(x, y, w, h, image, Color::rgba(1.0, 1.0, 1.0, 1.0)) } /// Submits a tinted image to be rendered @@ -493,7 +496,8 @@ impl UIRenderer { /// /// The image is rendered using its original /// loaded size. - pub fn image_tined( + #[allow(dead_code)] + pub fn image_tinted( &mut self, x: f32, y: f32, @@ -634,6 +638,7 @@ impl UIRenderer { /// uploaded into the shared atlas texture /// array. Larger images are stored in a /// dedicated texture. + #[allow(dead_code)] pub fn load_image( &mut self, gpu: &mut G, diff --git a/faith-ui/src/ui/text.rs b/faith-ui/src/ui/text.rs index cce45af..2873ca7 100644 --- a/faith-ui/src/ui/text.rs +++ b/faith-ui/src/ui/text.rs @@ -113,6 +113,7 @@ struct TextLayoutKey { /// information after layout computation. /// Used to render layouted text (render_wrapped) #[derive(Debug, Clone)] +#[allow(dead_code)] pub struct TextLayout { lines: Vec, paragraph_runs: Arc<[ShapedTextRun]>, @@ -183,6 +184,7 @@ struct ClusterGroup { /// `x_advance` stores the scaled pixel advance of this /// slice. #[derive(Debug, Clone)] +#[allow(dead_code)] struct RunSlice { run_index: usize, glyph_range: std::ops::Range, @@ -196,6 +198,7 @@ struct RunSlice { /// right-to-left shaped run and is used for horizontal /// placement/alignment. #[derive(Debug, Clone)] +#[allow(dead_code)] struct TextLine { slices: Vec, width: f32, @@ -790,6 +793,7 @@ impl TextRenderer { Ok(font) } + #[allow(dead_code)] fn render_run_slice( &mut self, run_x: f32, @@ -1389,7 +1393,6 @@ impl TextRenderer { Ok(layout) } - pub fn measure_with_options( &mut self, text: &str, @@ -1404,7 +1407,13 @@ impl TextRenderer { text: &str, font_handle: FontHandle, ) -> anyhow::Result> { - self.measure_with_options(text, font_handle, TextLayoutOptions{ max_width: std::f32::MAX}) + self.measure_with_options( + text, + font_handle, + TextLayoutOptions { + max_width: f32::MAX, + }, + ) } fn is_leading_forbidden_token(&self, token: &str) -> bool { @@ -1434,6 +1443,7 @@ impl TextRenderer { /// Lays out the text into wrapped lines using /// `max_width` and renders the resulting layout /// at the given position. + #[allow(dead_code)] pub fn render_wrapped( &mut self, xy: [f32; 2],