From 54be0f1d444f06a0e93b494e19977052c9678388 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Tue, 7 Jul 2026 10:06:17 +0100 Subject: [PATCH 1/2] chore: update crate version released v0.7.0 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ Cargo.lock | 8 ++++---- config/Cargo.toml | 2 +- engine/preprocessor/Cargo.toml | 2 +- engine/translator/Cargo.toml | 2 +- service/Cargo.toml | 8 ++++---- 6 files changed, 35 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1079dc6..d743906 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +### Added + +### Fixed + +## [0.7.0] - 2026-07-07 + +### Changed + +- (lib) Updated dependencies. [(#295)](https://github.com/fodydev/afrim/pull/295) +- Removed the inhibit feature. [(#294)](https://github.com/fodydev/afrim/pull/294) +- (lib) Improved the afrim api. [(#286)](https://github.com/fodydev/afrim/pull/286) & [(#292)](https://github.com/fodydev/afrim/pull/292) +- Updated rust toolchain version to 1.96. [(#279)](https://github.com/fodydev/afrim/pull/279) & [(#280)](https://github.com/fodydev/afrim/pull/280) + +### Added + +- Added the possibility to adjust the prediction confidence in the configuration file. [(#291)](https://github.com/fodydev/afrim/pull/291) + +### Fixed + +- Improved the performance of configuration files loading. [(#281)](https://github.com/fodydev/afrim/pull/281) +- Improved the performance of the translation system. [(#278)](https://github.com/fodydev/afrim/pull/278) + ## [0.6.2] - 2025-10-23 - (lib) Updated dependencies. [(#275)](https://github.com/fodydev/afrim/pull/275) diff --git a/Cargo.lock b/Cargo.lock index d451ecb..c80d521 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "afrim" -version = "0.6.2" +version = "0.7.0" dependencies = [ "afrim-config", "afrim-preprocessor", @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "afrim-config" -version = "0.4.7" +version = "0.4.8" dependencies = [ "anyhow", "indexmap", @@ -34,7 +34,7 @@ version = "0.4.2" [[package]] name = "afrim-preprocessor" -version = "0.6.3" +version = "0.7.0" dependencies = [ "afrim-memory", "keyboard-types", @@ -43,7 +43,7 @@ dependencies = [ [[package]] name = "afrim-translator" -version = "0.2.3" +version = "0.2.4" dependencies = [ "criterion", "indexmap", diff --git a/config/Cargo.toml b/config/Cargo.toml index ced96c3..6797433 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim-config" -version = "0.4.7" +version = "0.4.8" edition = "2021" description = "Handle the configuration of the afrim input method." keywords = ["ime", "config"] diff --git a/engine/preprocessor/Cargo.toml b/engine/preprocessor/Cargo.toml index e3ef5b0..cbec964 100644 --- a/engine/preprocessor/Cargo.toml +++ b/engine/preprocessor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim-preprocessor" -version = "0.6.3" +version = "0.7.0" edition = "2021" description = "A preprocessor to process keyboard events for an input method." keywords = ["ime", "processor", "keyboard"] diff --git a/engine/translator/Cargo.toml b/engine/translator/Cargo.toml index b86cd6f..fb17a8d 100644 --- a/engine/translator/Cargo.toml +++ b/engine/translator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim-translator" -version = "0.2.3" +version = "0.2.4" edition = "2021" description = "Manage the predication system of the afrim input method." keywords = ["auto-complete", "ime", "predication"] diff --git a/service/Cargo.toml b/service/Cargo.toml index d8b82d0..b9abdbc 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afrim" -version = "0.6.2" +version = "0.7.0" edition = "2021" description = "Core library of the afrim input method." keywords = ["ime", "keyboard"] @@ -26,9 +26,9 @@ serde = ["dep:serde", "afrim-translator/serde"] [dependencies] clap = { version = "4.6.1", features = ["derive"] } enigo = "0.6.1" -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 } +afrim-config = { version = "0.4.8", path = "../config", default-features = false } +afrim-preprocessor = { version = "0.7.0", path = "../engine/preprocessor", default-features = false } +afrim-translator = { version = "0.2.4", path = "../engine/translator", default-features = false } rdev = { git = "https://github.com/Narsil/rdev.git", rev = "b7e201bf80be7b9632207366f277d29fe732b9c1" } anyhow = "1.0.103" serde = { version = "1.0.228", optional = true } From ea6b715c12fa84bd92c369f10a05d184340a5a38 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Tue, 7 Jul 2026 10:20:28 +0100 Subject: [PATCH 2/2] fix rdev crate version issues --- Cargo.lock | 211 ++++++++++++++++++++++++++++----------------- service/Cargo.toml | 7 +- 2 files changed, 135 insertions(+), 83 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c80d521..b5dc6af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,6 +158,12 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.13.0" @@ -168,13 +174,10 @@ dependencies = [ ] [[package]] -name = "block2" -version = "0.6.2" +name = "block" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" -dependencies = [ - "objc2", -] +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "bumpalo" @@ -271,6 +274,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +[[package]] +name = "cocoa" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667fdc068627a2816b9ff831201dd9864249d6ee8d190b9532357f1fc0f61ea7" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation 0.9.4", + "core-graphics 0.21.0", + "foreign-types 0.3.2", + "libc", + "objc", +] + [[package]] name = "colorchoice" version = "1.0.5" @@ -297,32 +315,82 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "core-foundation" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +dependencies = [ + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "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", + "core-foundation-sys 0.8.7", "libc", ] +[[package]] +name = "core-foundation-sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" + [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.7.0", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52a67c4378cf203eace8fb6567847eb641fd6ff933c1145a115c6ee820ebb978" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.9.4", + "foreign-types 0.3.2", + "libc", +] + [[package]] name = "core-graphics" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" dependencies = [ - "bitflags", - "core-foundation", + "bitflags 2.13.0", + "core-foundation 0.10.1", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -332,8 +400,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags", - "core-foundation", + "bitflags 2.13.0", + "core-foundation 0.10.1", "libc", ] @@ -403,19 +471,13 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - [[package]] name = "dispatch2" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags", + "bitflags 2.13.0", "objc2", ] @@ -431,9 +493,9 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71c6c56e50f7acae2906a0dcbb34529ca647e40421119ad5d12e7f8ba6e50010" dependencies = [ - "core-foundation", - "core-graphics", - "foreign-types-shared", + "core-foundation 0.10.1", + "core-graphics 0.25.0", + "foreign-types-shared 0.3.1", "libc", "log", "nom", @@ -468,6 +530,15 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -475,7 +546,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared", + "foreign-types-shared 0.3.1", ] [[package]] @@ -489,6 +560,12 @@ dependencies = [ "syn", ] +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -627,7 +704,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" dependencies = [ - "bitflags", + "bitflags 2.13.0", "serde", "unicode-segmentation", ] @@ -656,6 +733,15 @@ version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.8.2" @@ -689,6 +775,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + [[package]] name = "objc2" version = "0.6.4" @@ -704,7 +799,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags", + "bitflags 2.13.0", "objc2", "objc2-foundation", ] @@ -715,27 +810,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags", - "block2", - "dispatch2", - "libc", - "objc2", -] - -[[package]] -name = "objc2-core-graphics" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" -dependencies = [ - "bitflags", - "block2", + "bitflags 2.13.0", "dispatch2", - "libc", "objc2", - "objc2-core-foundation", - "objc2-io-surface", - "objc2-metal", ] [[package]] @@ -750,35 +827,11 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags", - "block2", - "libc", - "objc2", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-io-surface" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" -dependencies = [ - "bitflags", + "bitflags 2.13.0", "objc2", "objc2-core-foundation", ] -[[package]] -name = "objc2-metal" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" -dependencies = [ - "bitflags", - "objc2", - "objc2-foundation", -] - [[package]] name = "once_cell" version = "1.21.4" @@ -902,18 +955,16 @@ dependencies = [ [[package]] name = "rdev" -version = "0.6.0" -source = "git+https://github.com/Narsil/rdev.git?rev=b7e201bf80be7b9632207366f277d29fe732b9c1#b7e201bf80be7b9632207366f277d29fe732b9c1" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00552ca2dc2f93b84cd7b5581de49549411e4e41d89e1c691bcb93dc4be360c3" dependencies = [ - "core-foundation", - "core-foundation-sys", - "dispatch", + "cocoa", + "core-foundation 0.7.0", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", "lazy_static", "libc", - "objc2", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation", "winapi", "x11", ] @@ -954,7 +1005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd4dd0f8c36625202a4ba553c416c19b719947cd2a31d1bda06126e4a5727daf" dependencies = [ "ahash", - "bitflags", + "bitflags 2.13.0", "getrandom 0.3.4", "num-traits", "once_cell", @@ -983,7 +1034,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags", + "bitflags 2.13.0", "errno", "libc", "linux-raw-sys", diff --git a/service/Cargo.toml b/service/Cargo.toml index b9abdbc..8d000b6 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -29,12 +29,13 @@ enigo = "0.6.1" afrim-config = { version = "0.4.8", path = "../config", default-features = false } afrim-preprocessor = { version = "0.7.0", path = "../engine/preprocessor", default-features = false } afrim-translator = { version = "0.2.4", path = "../engine/translator", default-features = false } -rdev = { git = "https://github.com/Narsil/rdev.git", rev = "b7e201bf80be7b9632207366f277d29fe732b9c1" } +rdev = "0.5.3" +# rdev = "6.0.0" anyhow = "1.0.103" serde = { version = "1.0.228", optional = true } -[target.'cfg(all(target_family = "unix", not(target_os = "macos")))'.dependencies] -rdev = { git = "https://github.com/Narsil/rdev.git", rev = "b7e201bf80be7b9632207366f277d29fe732b9c1", features = ["x11"] } +# [target.'cfg(all(target_family = "unix", not(target_os = "macos")))'.dependencies] +# rdev = { version = "6.0.0", features = ["x11"] } [dev-dependencies] afrish = "0.1.1"