From f8a21246b1176668fe9413b2f2a2d9c2bffc044e Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Thu, 12 Jun 2025 10:26:00 +0100 Subject: [PATCH 1/5] patch: upgrade to rust toolchain 1.87 --- Cargo.lock | 784 ++++++++++++++++++++--------- config/Cargo.toml | 12 +- engine/preprocessor/Cargo.toml | 8 +- engine/preprocessor/src/lib.rs | 17 +- engine/translator/Cargo.toml | 12 +- engine/translator/benches/bench.rs | 3 +- memory/src/lib.rs | 19 +- rust-toolchain | 2 +- service/Cargo.toml | 16 +- service/src/convert.rs | 26 +- service/src/lib.rs | 31 +- 11 files changed, 632 insertions(+), 298 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e1fa07f..00f4edb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,10 +1,10 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "afrim" -version = "0.6.0" +version = "0.6.1" dependencies = [ "afrim-config", "afrim-preprocessor", @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "afrim-config" -version = "0.4.5" +version = "0.4.6" dependencies = [ "anyhow", "indexmap", @@ -34,7 +34,7 @@ version = "0.4.2" [[package]] name = "afrim-preprocessor" -version = "0.6.1" +version = "0.6.2" dependencies = [ "afrim-memory", "keyboard-types", @@ -43,7 +43,7 @@ dependencies = [ [[package]] name = "afrim-translator" -version = "0.2.1" +version = "0.2.2" dependencies = [ "criterion", "indexmap", @@ -59,13 +59,13 @@ source = "git+https://github.com/fodydev/afrish?rev=e8c4fa2#e8c4fa2b2a0de717962d [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", "const-random", - "getrandom", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", @@ -88,63 +88,65 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" dependencies = [ "anstyle", + "once_cell_polyfill", "windows-sys", ] [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -154,9 +156,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" dependencies = [ "serde", ] @@ -169,9 +171,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" [[package]] name = "cast" @@ -181,9 +183,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "ciborium" @@ -214,9 +216,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", "clap_derive", @@ -224,9 +226,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ "anstream", "anstyle", @@ -236,9 +238,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ "heck", "proc-macro2", @@ -248,9 +250,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "cocoa" @@ -269,9 +271,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "const-random" @@ -288,7 +290,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom", + "getrandom 0.2.16", "once_cell", "tiny-keccak", ] @@ -309,7 +311,17 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "core-foundation-sys 0.8.6", + "core-foundation-sys 0.8.7", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys 0.8.7", "libc", ] @@ -321,9 +333,9 @@ checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" @@ -351,12 +363,12 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.23.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", + "bitflags 2.9.1", + "core-foundation 0.10.1", "core-graphics-types", "foreign-types 0.5.0", "libc", @@ -364,36 +376,33 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", + "bitflags 2.9.1", + "core-foundation 0.10.1", "libc", ] [[package]] name = "criterion" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "3bf7af66b0989381bd0be551bd7cc91912a655a58c6918420c9527b1fd8b4679" dependencies = [ "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", - "itertools", + "itertools 0.13.0", "num-traits", - "once_cell", "oorandom", "plotters", "rayon", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -406,14 +415,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", - "itertools", + "itertools 0.10.5", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -430,40 +439,68 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" + +[[package]] +name = "dispatch2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.9.1", + "objc2", +] [[package]] name = "either" -version = "1.11.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "enigo" -version = "0.1.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802e4b2ae123615659085369b453cba87c5562e46ed8050a909fee18a9bc3157" +checksum = "71744ff36f35a4276e8827add8102d0e792378c574fd93cb4e1c8e0505f96b7c" dependencies = [ - "core-graphics 0.23.2", + "core-foundation 0.10.1", + "core-graphics 0.25.0", + "foreign-types-shared 0.3.1", "libc", - "objc", - "pkg-config", + "log", + "nom", + "objc2", + "objc2-app-kit", + "objc2-foundation", "windows", + "x11rb", + "xkbcommon", + "xkeysym", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +dependencies = [ + "libc", + "windows-sys", +] [[package]] name = "foreign-types" @@ -507,24 +544,46 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + [[package]] name = "half" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if", "crunchy", @@ -532,9 +591,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "heck" @@ -542,17 +601,11 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "indexmap" -version = "2.2.6" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -561,9 +614,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -572,15 +625,10 @@ dependencies = [ ] [[package]] -name = "is-terminal" -version = "0.4.12" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -591,49 +639,65 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "keyboard-types" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +checksum = "fd6e0f18953c66af118a70064505bd3780a226d65b06553b7293fb8933067967" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.1", "serde", "unicode-segmentation", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.172" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "log" -version = "0.4.21" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "malloc_buf" @@ -646,15 +710,33 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + +[[package]] +name = "nom" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -668,29 +750,86 @@ dependencies = [ "malloc_buf", ] +[[package]] +name = "objc2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88c6597e14493ab2e44ce58f2fdecf095a51f12ca57bec060a11c57332520551" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" +dependencies = [ + "bitflags 2.9.1", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" +dependencies = [ + "bitflags 2.9.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" +dependencies = [ + "bitflags 2.9.1", + "objc2", + "objc2-core-foundation", +] + [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -701,37 +840,49 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "rayon" version = "1.10.0" @@ -770,9 +921,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -782,9 +933,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -793,19 +944,19 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rhai" -version = "1.18.0" +version = "1.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a7d88770120601ba1e548bb6bc2a05019e54ff01b51479e38e64ec3b59d4759" +checksum = "2780e813b755850e50b178931aaf94ed24f6817f46aaaf5d21c13c12d939a249" dependencies = [ "ahash", - "bitflags 2.5.0", - "getrandom", + "bitflags 2.9.1", + "getrandom 0.2.16", "instant", "num-traits", "once_cell", @@ -818,20 +969,39 @@ dependencies = [ [[package]] name = "rhai_codegen" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59aecf17969c04b9c0c5d21f6bc9da9fec9dd4980e64d1871443a476589d8c86" +checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -844,18 +1014,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -864,29 +1034,30 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" dependencies = [ "serde", ] @@ -917,9 +1088,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.60" +version = "2.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "f6397daf94fa90f058bd0fd88429dd9e5738999cca8d701813c80723add80462" dependencies = [ "proc-macro2", "quote", @@ -928,9 +1099,9 @@ dependencies = [ [[package]] name = "thin-vec" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" +checksum = "144f754d318415ac792f9d69fc87abbbfc043ce2ef041c60f16ad828f638717d" dependencies = [ "serde", ] @@ -956,9 +1127,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "indexmap", "serde", @@ -969,49 +1140,56 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", + "toml_write", "winnow", ] +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -1025,29 +1203,39 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -1056,9 +1244,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1066,9 +1254,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -1079,15 +1267,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -1111,9 +1302,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ "windows-sys", ] @@ -1126,30 +1317,113 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.51.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +checksum = "e2b85ac982d24496e0b49912479da8a89c0ba7b1d8bf6de49df12af42e94b325" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ "windows-core", - "windows-targets 0.48.5", ] [[package]] name = "windows-core" -version = "0.51.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-targets 0.48.5", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3bfe459f85da17560875b8bf1423d6f113b7a87a5d942e7da0ac71be7c61f8b" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", ] [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1169,18 +1443,27 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", ] [[package]] @@ -1191,9 +1474,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -1203,9 +1486,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -1215,15 +1498,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -1233,9 +1516,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -1245,9 +1528,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -1257,9 +1540,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -1269,19 +1552,28 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.7" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + [[package]] name = "x11" version = "2.21.0" @@ -1292,20 +1584,54 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "gethostname", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "xkbcommon" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" +dependencies = [ + "libc", + "memmap2", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", diff --git a/config/Cargo.toml b/config/Cargo.toml index 716c530..596d62a 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim-config" -version = "0.4.5" +version = "0.4.6" edition = "2021" description = "Handle the configuration of the afrim input method." keywords = ["ime", "config"] @@ -17,8 +17,8 @@ rhai = ["dep:rhai"] rhai-wasm = ["rhai", "rhai/wasm-bindgen"] [dependencies] -rhai = { version = "1.17.1", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } -indexmap = { version = "2.2.6", features = ["serde"] } -serde = { version = "1.0.197", features = ["derive"] } -toml = { version = "0.8.12", features = ["preserve_order"] } -anyhow = "1.0.81" +rhai = { version = "1.22.2", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } +indexmap = { version = "2.9.0", features = ["serde"] } +serde = { version = "1.0.219", features = ["derive"] } +toml = { version = "0.8.23", features = ["preserve_order"] } +anyhow = "1.0.98" diff --git a/engine/preprocessor/Cargo.toml b/engine/preprocessor/Cargo.toml index cb0b928..370ef56 100644 --- a/engine/preprocessor/Cargo.toml +++ b/engine/preprocessor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim-preprocessor" -version = "0.6.1" +version = "0.6.2" edition = "2021" description = "A preprocessor to process keyboard events for an input method." keywords = ["ime", "processor", "keyboard"] @@ -17,9 +17,9 @@ inhibit = [] serde = ["dep:serde", "keyboard-types/serde"] [dependencies] -keyboard-types = { version = "0.7.0", default-features = false } +keyboard-types = { version = "0.8.0", default-features = false } afrim-memory = { version = "0.4.2", path = "../../memory" } -serde = { version = "1.0.197", features = ["derive"], optional = true } +serde = { version = "1.0.219", features = ["derive"], optional = true } [dev-dependencies] -keyboard-types = { version = "0.7.0", features = ["webdriver"] } +keyboard-types = { version = "0.8.0", features = ["webdriver"] } diff --git a/engine/preprocessor/src/lib.rs b/engine/preprocessor/src/lib.rs index c46b1e7..ec7891a 100644 --- a/engine/preprocessor/src/lib.rs +++ b/engine/preprocessor/src/lib.rs @@ -11,7 +11,6 @@ //! use afrim_preprocessor::{utils, Command, Preprocessor}; //! use keyboard_types::{ //! webdriver::{self, Event}, -//! Key::*, //! }; //! use std::{collections::VecDeque, rc::Rc}; //! @@ -71,7 +70,7 @@ mod message; pub use crate::message::Command; pub use afrim_memory::utils; use afrim_memory::{Cursor, Node}; -pub use keyboard_types::{Key, KeyState, KeyboardEvent}; +pub use keyboard_types::{Key, KeyState, KeyboardEvent, NamedKey}; use std::{collections::VecDeque, rc::Rc}; /// The main structure of the preprocessor. @@ -87,6 +86,7 @@ impl Preprocessor { /// The preprocessor needs a memory to operate. You have two options to build this memory. /// - Use the [`afrim-memory`] crate. /// - Use the [`utils`] module. + /// /// It also needs you set the capacity of his cursor. We recommend to set a capacity equal /// or greater than N times the maximun sequence length that you want to handle. /// Where N is the number of sequences that you want track in the cursor. @@ -169,7 +169,7 @@ impl Preprocessor { /// /// ``` /// use afrim_preprocessor::{Command, Preprocessor, utils}; - /// use keyboard_types::{Key::*, KeyboardEvent}; + /// use keyboard_types::{Key::Character, KeyboardEvent}; /// use std::{collections::VecDeque, rc::Rc}; /// /// // We prepare the memory. @@ -238,7 +238,7 @@ impl Preprocessor { let (mut changed, mut committed) = (false, false); match (event.state, event.key) { - (KeyState::Down, Key::Backspace) => { + (KeyState::Down, Key::Named(NamedKey::Backspace)) => { #[cfg(not(feature = "inhibit"))] { self.pause(); @@ -292,7 +292,7 @@ impl Preprocessor { self.resume(); changed = true; } - (KeyState::Down, Key::Shift | Key::CapsLock) => (), + (KeyState::Down, Key::Named(NamedKey::Shift) | Key::Named(NamedKey::CapsLock)) => (), (KeyState::Down, _) => { self.cursor.clear(); changed = true; @@ -314,7 +314,7 @@ impl Preprocessor { /// /// ``` /// use afrim_preprocessor::{Command, Preprocessor, utils}; - /// use keyboard_types::{Key::*, KeyboardEvent}; + /// use keyboard_types::{Key::Character, KeyboardEvent}; /// use std::{collections::VecDeque, rc::Rc}; /// /// // We prepare the memory. @@ -397,7 +397,7 @@ impl Preprocessor { /// /// ``` /// use afrim_preprocessor::{Command, Preprocessor, utils}; - /// use keyboard_types::{Key::*, webdriver::{self, Event}}; + /// use keyboard_types::webdriver::{self, Event}; /// use std::{collections::VecDeque, rc::Rc}; /// /// // We prepare the memory. @@ -493,6 +493,7 @@ mod tests { use keyboard_types::{ webdriver::{self, Event}, Key::*, + NamedKey, }; use std::collections::VecDeque; @@ -585,7 +586,7 @@ mod tests { let memory = utils::build_map(data); let mut preprocessor = Preprocessor::new(Rc::new(memory), 8); let backspace_event = KeyboardEvent { - key: Backspace, + key: Named(NamedKey::Backspace), ..Default::default() }; diff --git a/engine/translator/Cargo.toml b/engine/translator/Cargo.toml index 07b69f7..38b2b58 100644 --- a/engine/translator/Cargo.toml +++ b/engine/translator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim-translator" -version = "0.2.1" +version = "0.2.2" edition = "2021" description = "Manage the predication system of the afrim input method." keywords = ["auto-complete", "ime", "predication"] @@ -20,13 +20,13 @@ strsim = ["dep:strsim"] serde = ["indexmap/serde", "rhai?/serde", "dep:serde"] [dependencies] -rhai = { version = "1.17.1", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } -indexmap = { version = "2.2.6" } -strsim = { version = "0.11.0", optional = true } -serde = { version = "1.0.197", optional = true } +rhai = { version = "1.22.2", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } +indexmap = { version = "2.9.0" } +strsim = { version = "0.11.1", optional = true } +serde = { version = "1.0.219", optional = true } [dev-dependencies] -criterion = "0.5.1" +criterion = "0.6.0" [[bench]] name = "bench" diff --git a/engine/translator/benches/bench.rs b/engine/translator/benches/bench.rs index 2b11d84..df5a99a 100644 --- a/engine/translator/benches/bench.rs +++ b/engine/translator/benches/bench.rs @@ -1,8 +1,9 @@ #[cfg(feature = "rhai")] use afrim_translator::Engine; use afrim_translator::Translator; -use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion}; +use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; use indexmap::IndexMap; +use std::hint::black_box; pub fn translate(c: &mut Criterion) { // Generates the dataset. diff --git a/memory/src/lib.rs b/memory/src/lib.rs index 2360618..ba9ae65 100644 --- a/memory/src/lib.rs +++ b/memory/src/lib.rs @@ -6,9 +6,9 @@ //! //! # Notes //! - sequence: A sequential code corresponding to a character. -//! Eg. af1 = "ɑ̀" +//! Eg. af1 = "ɑ̀" //! - input: The user input (or a set of sequences). -//! Eg. ngaf7 nkwe2e2 ka7meru7n +//! Eg. ngaf7 nkwe2e2 ka7meru7n //! - text buffer: The memory where our text data will be stored. //! - node: A node in the text buffer. //! @@ -366,10 +366,10 @@ impl Cursor { /// /// **Note**: /// - The `\0` at the index 0, marks the beginning of a new sequence and the end of a - /// old. It also represents the root node. + /// old. It also represents the root node. /// - A character don't necessary need to be in the text buffer. The cursor will create a - /// tempory node to represent it in his internal memory. All characters not present in the text - /// buffer will be at the same depth that the root node. + /// tempory node to represent it in his internal memory. All characters not present in the text + /// buffer will be at the same depth that the root node. pub fn hit(&mut self, character: char) -> Option { let node = self .buffer @@ -473,12 +473,7 @@ impl Cursor { /// assert_eq!(cursor.hit('_'), Some("ç".to_owned()).to_owned()); /// ``` pub fn resume(&mut self) { - if self - .buffer - .iter() - .last() - .map_or(false, |node| node.is_root()) - { + if self.buffer.iter().last().is_some_and(|node| node.is_root()) { self.buffer.pop_back(); } } @@ -577,7 +572,7 @@ impl Cursor { /// assert!(!cursor.is_empty()); /// ``` pub fn is_empty(&self) -> bool { - return self.buffer.iter().filter(|c| c.key != '\0').count() == 0; + self.buffer.iter().filter(|c| c.key != '\0').count() == 0 } } diff --git a/rust-toolchain b/rust-toolchain index 9242d8e..8a2b133 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.76 +1.87 diff --git a/service/Cargo.toml b/service/Cargo.toml index f40668f..e41889b 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim" -version = "0.6.0" +version = "0.6.1" edition = "2021" description = "Core library of the afrim input method." keywords = ["ime", "keyboard"] @@ -25,14 +25,14 @@ inhibit = ["afrim-preprocessor/inhibit"] serde = ["dep:serde", "afrim-translator/serde"] [dependencies] -clap = { version = "4.5.4", features = ["derive"] } -enigo = "0.1.3" -afrim-config = { version = "0.4.5", path = "../config", default-features = false } -afrim-preprocessor = { version = "0.6.1", path = "../engine/preprocessor", default-features = false } -afrim-translator = { version = "0.2.1", path = "../engine/translator", default-features = false } +clap = { version = "4.5.40", features = ["derive"] } +enigo = "0.5.0" +afrim-config = { version = "0.4.6", path = "../config", default-features = false } +afrim-preprocessor = { version = "0.6.2", path = "../engine/preprocessor", default-features = false } +afrim-translator = { version = "0.2.2", path = "../engine/translator", default-features = false } rdev = "0.5.3" -anyhow = "1.0.81" -serde = { version = "1.0.197", optional = true } +anyhow = "1.0.98" +serde = { version = "1.0.219", optional = true } [dev-dependencies] afrish = { version = "0.1.0", default-features = false, git = "https://github.com/fodydev/afrish", rev = "e8c4fa2" } diff --git a/service/src/convert.rs b/service/src/convert.rs index 549e0f8..819f952 100644 --- a/service/src/convert.rs +++ b/service/src/convert.rs @@ -3,7 +3,7 @@ //! generic keyboard events and vice versa. //! -use afrim_preprocessor::{Key, KeyState, KeyboardEvent}; +use afrim_preprocessor::{Key, KeyState, KeyboardEvent, NamedKey::*}; use rdev::{self}; /// Converts an rdev::Event into a KeyboardEvent. @@ -29,18 +29,18 @@ pub fn from_event(event: rdev::Event) -> KeyboardEvent { /// Converts an rdev::Key into a Key. pub fn from_key(key: rdev::Key) -> Key { match key { - rdev::Key::Alt => Key::Alt, - rdev::Key::AltGr => Key::AltGraph, - rdev::Key::Backspace => Key::Backspace, - rdev::Key::CapsLock => Key::CapsLock, - rdev::Key::ControlLeft => Key::Control, - rdev::Key::ControlRight => Key::Control, - rdev::Key::ShiftLeft => Key::Shift, - rdev::Key::ShiftRight => Key::Shift, - rdev::Key::ScrollLock => Key::ScrollLock, - rdev::Key::Pause => Key::Pause, - rdev::Key::NumLock => Key::NumLock, - rdev::Key::Insert => Key::Insert, + rdev::Key::Alt => Key::Named(Alt), + rdev::Key::AltGr => Key::Named(AltGraph), + rdev::Key::Backspace => Key::Named(Backspace), + rdev::Key::CapsLock => Key::Named(CapsLock), + rdev::Key::ControlLeft => Key::Named(Control), + rdev::Key::ControlRight => Key::Named(Control), + rdev::Key::ShiftLeft => Key::Named(Shift), + rdev::Key::ShiftRight => Key::Named(Shift), + rdev::Key::ScrollLock => Key::Named(ScrollLock), + rdev::Key::Pause => Key::Named(Pause), + rdev::Key::NumLock => Key::Named(NumLock), + rdev::Key::Insert => Key::Named(Insert), _ => Default::default(), } } diff --git a/service/src/lib.rs b/service/src/lib.rs index e4e2fa7..d5ae663 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -5,7 +5,7 @@ pub use afrim_config::Config; use afrim_preprocessor::{utils, Command as EventCmd, Preprocessor}; use afrim_translator::Translator; use anyhow::{Context, Result}; -use enigo::{Enigo, Key, KeyboardControllable}; +use enigo::{Direction, Enigo, Key, Keyboard}; use frontend::{Command as GUICmd, Frontend}; use rdev::{self, EventType, Key as E_Key}; use std::{rc::Rc, sync::mpsc, thread}; @@ -38,7 +38,7 @@ pub fn run( ) }) .unwrap_or((32, false, 10)); - let mut keyboard = Enigo::new(); + let mut keyboard = Enigo::new(&Default::default()).unwrap(); let mut preprocessor = Preprocessor::new(Rc::new(memory), buffer_size); #[cfg(not(feature = "rhai"))] let translator = Translator::new(config.extract_translation(), auto_commit); @@ -166,13 +166,13 @@ pub fn run( while let Some(command) = preprocessor.pop_queue() { match command { EventCmd::CommitText(text) => { - keyboard.key_sequence(&text); + keyboard.text(&text).unwrap(); } EventCmd::CleanDelete => { - keyboard.key_up(Key::Backspace); + keyboard.key(Key::Backspace, Direction::Release).unwrap(); } EventCmd::Delete => { - keyboard.key_click(Key::Backspace); + keyboard.key(Key::Backspace, Direction::Click).unwrap(); } EventCmd::Pause => { rdev::simulate(&EventType::KeyPress(E_Key::Pause)).unwrap(); @@ -206,6 +206,7 @@ mod tests { use crate::{frontend::Console, run, Config}; use afrish::{self, TkPackLayout}; use rdev::{self, Button, EventType::*, Key::*}; + use std::sync::mpsc::{self, Sender}; use std::{thread, time::Duration}; macro_rules! input { @@ -243,13 +244,14 @@ mod tests { root.title("Afrim Test Environment"); let input_field = afrish::make_text(&root); - input_field.width(50); - input_field.height(12); + input_field.width(500); + input_field.height(120); input_field.pack().layout(); - root.geometry(200, 200, 0, 0); input_field.insert((1, 1), start_point); + root.position(0, 0); afrish::tell_wish("wm protocol . WM_DELETE_WINDOW {destroy .};"); thread::sleep(Duration::from_secs(1)); + input_field } @@ -257,7 +259,7 @@ mod tests { afrish::end_wish(); } - fn start_simulation() { + fn start_simulation(signal: Sender<()>) { let typing_speed_ms = Duration::from_millis(500); // To detect excessive backspace @@ -266,6 +268,9 @@ mod tests { // Start the sandbox let textfield = start_sandbox(LIMIT); + // Send the ready signal. + signal.send(()); + rdev::simulate(&MouseMove { x: 100.0, y: 100.0 }).unwrap(); thread::sleep(typing_speed_ms); rdev::simulate(&ButtonPress(Button::Left)).unwrap(); @@ -381,7 +386,13 @@ mod tests { fn test_afrim() { use std::path::Path; - let simulation_thread = thread::spawn(start_simulation); + let (tx, rx) = mpsc::channel(); + + // TODO: handle simulation errors. + let simulation_thread = thread::spawn(move || start_simulation(tx)); + + // Wait the ready signal. + rx.recv().unwrap(); let test_config = Config::from_file(Path::new("./data/test.toml")).unwrap(); assert!(run(test_config, Console::default()).is_ok()); From f817fa044aeae5f57b4da116244e9be2491338b4 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Thu, 12 Jun 2025 13:28:15 +0100 Subject: [PATCH 2/5] fix clippy --- service/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/lib.rs b/service/src/lib.rs index d5ae663..2472cee 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -269,7 +269,7 @@ mod tests { let textfield = start_sandbox(LIMIT); // Send the ready signal. - signal.send(()); + signal.send(()).unwrap(); rdev::simulate(&MouseMove { x: 100.0, y: 100.0 }).unwrap(); thread::sleep(typing_speed_ms); From 9a84fb70b4b9f5e9c54c4851a904983521c7bdd3 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Thu, 12 Jun 2025 13:55:28 +0100 Subject: [PATCH 3/5] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c58e83c..d98f1fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.1] - 2025-06-12 + +### Changed + +- (lib) Updated dependencies. [(#267)](https://github.com/fodydev/afrim/pull/267) + ## [0.6.0] - 2024-04-28 ### Added From 99062d80f6712a38678d0e99ea6e34d4d14d6750 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Thu, 12 Jun 2025 15:26:38 +0100 Subject: [PATCH 4/5] fix wasm build --- Cargo.lock | 60 ++++++------------------------ config/Cargo.toml | 2 +- engine/translator/Cargo.toml | 4 +- engine/translator/benches/bench.rs | 11 ++++++ service/Cargo.toml | 2 +- 5 files changed, 27 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 00f4edb..0e10832 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,13 +59,13 @@ source = "git+https://github.com/fodydev/afrish?rev=e8c4fa2#e8c4fa2b2a0de717962d [[package]] name = "ahash" -version = "0.8.12" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", - "getrandom 0.3.3", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -290,7 +290,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.16", + "getrandom", "once_cell", "tiny-keccak", ] @@ -563,22 +563,10 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", -] - [[package]] name = "half" version = "2.6.0" @@ -877,12 +865,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - [[package]] name = "rayon" version = "1.10.0" @@ -950,13 +932,13 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rhai" -version = "1.22.2" +version = "1.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2780e813b755850e50b178931aaf94ed24f6817f46aaaf5d21c13c12d939a249" +checksum = "97681a65c15ad8e4d3f7eddfe49b663997f6323f903e9eb112596ed7fee6d28a" dependencies = [ "ahash", "bitflags 2.9.1", - "getrandom 0.2.16", + "getrandom", "instant", "num-traits", "once_cell", @@ -1207,15 +1189,6 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -1565,15 +1538,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] - [[package]] name = "x11" version = "2.21.0" @@ -1620,18 +1584,18 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", diff --git a/config/Cargo.toml b/config/Cargo.toml index 596d62a..9b7d093 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -17,7 +17,7 @@ rhai = ["dep:rhai"] rhai-wasm = ["rhai", "rhai/wasm-bindgen"] [dependencies] -rhai = { version = "1.22.2", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } +rhai = { version = "=1.22.1", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } indexmap = { version = "2.9.0", features = ["serde"] } serde = { version = "1.0.219", features = ["derive"] } toml = { version = "0.8.23", features = ["preserve_order"] } diff --git a/engine/translator/Cargo.toml b/engine/translator/Cargo.toml index 38b2b58..5a9feaa 100644 --- a/engine/translator/Cargo.toml +++ b/engine/translator/Cargo.toml @@ -20,12 +20,12 @@ strsim = ["dep:strsim"] serde = ["indexmap/serde", "rhai?/serde", "dep:serde"] [dependencies] -rhai = { version = "1.22.2", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } +rhai = { version = "=1.22.1", optional = true, features = ["only_i32", "no_float", "no_closure", "unchecked", "no_position", "no_custom_syntax"] } indexmap = { version = "2.9.0" } strsim = { version = "0.11.1", optional = true } serde = { version = "1.0.219", optional = true } -[dev-dependencies] +[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] criterion = "0.6.0" [[bench]] diff --git a/engine/translator/benches/bench.rs b/engine/translator/benches/bench.rs index df5a99a..b6daef2 100644 --- a/engine/translator/benches/bench.rs +++ b/engine/translator/benches/bench.rs @@ -1,10 +1,14 @@ +#![allow(unused_imports, dead_code)] + #[cfg(feature = "rhai")] use afrim_translator::Engine; use afrim_translator::Translator; +#[cfg(not(target_arch = "wasm32"))] use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; use indexmap::IndexMap; use std::hint::black_box; +#[cfg(not(target_arch = "wasm32"))] pub fn translate(c: &mut Criterion) { // Generates the dataset. let mut dictionary = IndexMap::new(); @@ -72,6 +76,13 @@ pub fn translate(c: &mut Criterion) { group.finish(); } +#[cfg(not(target_arch = "wasm32"))] criterion_group!(benches, translate); +#[cfg(not(target_arch = "wasm32"))] criterion_main!(benches); + +#[cfg(target_arch = "wasm32")] +fn main() { + panic!("Can't run benchmarks on wasm32"); +} diff --git a/service/Cargo.toml b/service/Cargo.toml index e41889b..6ab8a8f 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -13,7 +13,7 @@ authors.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [[bin]] -doc = false +doc = true name = "afrim" path = "./src/main.rs" From 16e4a02130260201ffa3bd7c9b7bee8213029e72 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Thu, 12 Jun 2025 15:46:20 +0100 Subject: [PATCH 5/5] not yet a release --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d98f1fd..a2b4b35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.6.1] - 2025-06-12 - ### Changed - (lib) Updated dependencies. [(#267)](https://github.com/fodydev/afrim/pull/267)