diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..b0a1877 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 1722365205654 + + + + \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4bce57b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + "recommendations": [ + "streetsidesoftware.code-spell-checker", + "usernamehw.errorlens", + "rust-lang.rust-analyzer", + "dustypomerleau.rust-syntax", + "tamasfe.even-better-toml", + "slint.slint" + ] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 31e130c..4fdc904 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "Rust-Calculator" -version = "8.0.0" +version = "9.0.0" dependencies = [ "slint", "slint-build", @@ -28,15 +28,15 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.12.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a4b14f3d99c1255dcba8f45621ab1a2e7540a0009652d33989005a4d0bfc6b" +checksum = "e4700bdc115b306d6c43381c344dc307f03b7f0460c304e4892c309930322bd7" [[package]] name = "accesskit_atspi_common" -version = "0.2.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9357ba093d0c8c234840f126efa71d09b848027b2963f553940021fb07bbf076" +checksum = "a1de72dc7093910a1284cef784b6b143bab0a34d67f6178e4fc3aaaf29a09f8b" dependencies = [ "accesskit", "accesskit_consumer", @@ -48,31 +48,33 @@ dependencies = [ [[package]] name = "accesskit_consumer" -version = "0.17.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6114c157d5b02e24b38e929afe99324f2f9cc116ce7d49fdbf3fea111369c14" +checksum = "fe3a07a32ab5837ad83db3230ac490c8504c2cd5b90ac8c00db6535f6ed65d0b" dependencies = [ "accesskit", + "immutable-chunkmap", ] [[package]] name = "accesskit_macos" -version = "0.11.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded5f12ee8af8d8dae8de4ef96bc6abdd94735973ba97bbd426da41005252553" +checksum = "a189d159c153ae0fce5f9eefdcfec4a27885f453ce5ef0ccf078f72a73c39d34" dependencies = [ "accesskit", "accesskit_consumer", - "icrate 0.1.2", - "objc2 0.5.2", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", ] [[package]] name = "accesskit_unix" -version = "0.7.5" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454040abdc130ca45d9142cc6ea0b196fb53119f62600d88665ae6090d597f3e" +checksum = "b76c448cfd96d16131a9ad3ab786d06951eb341cdac1db908978ab010245a19d" dependencies = [ "accesskit", "accesskit_atspi_common", @@ -82,36 +84,34 @@ dependencies = [ "atspi", "futures-lite 1.13.0", "futures-util", - "once_cell", "serde", "zbus", ] [[package]] name = "accesskit_windows" -version = "0.16.4" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b698c3561514806519d28c63b6a2b1f5797f5ae3042a9caa4d64b7b928ff69" +checksum = "682d8c4fb425606f97408e7577793f32e96310b646fa77662eb4216293eddc7f" dependencies = [ "accesskit", "accesskit_consumer", - "once_cell", "paste", "static_assertions", - "windows", + "windows 0.54.0", ] [[package]] name = "accesskit_winit" -version = "0.18.7" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d80d7aa92a9334120580e9fe2028670f48f2b1a30cdf8bfd3d038c2f430345" +checksum = "9afbd6d598b7c035639ad2b664aa0edc94c93dc1fc3ebb4b40d8a95fcd43ffac" dependencies = [ "accesskit", "accesskit_macos", "accesskit_unix", "accesskit_windows", - "raw-window-handle 0.6.2", + "raw-window-handle", "winit", ] @@ -163,9 +163,30 @@ dependencies = [ "jni-sys", "libc", "log", - "ndk", + "ndk 0.8.0", "ndk-context", - "ndk-sys", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum", + "thiserror", +] + +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.6.0", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk 0.9.0", + "ndk-context", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -176,6 +197,21 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "arrayref" version = "0.3.7" @@ -450,7 +486,7 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -497,33 +533,13 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys", -] - [[package]] name = "block2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" -dependencies = [ - "block-sys", - "objc2 0.4.1", -] - -[[package]] -name = "block2" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "block-sys", - "objc2 0.5.2", + "objc2", ] [[package]] @@ -597,13 +613,39 @@ dependencies = [ "thiserror", ] +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.6.0", + "log", + "polling 3.7.2", + "rustix 0.38.34", + "slab", + "thiserror", +] + [[package]] name = "calloop-wayland-source" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop", + "calloop 0.12.4", + "rustix 0.38.34", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", "rustix 0.38.34", "wayland-backend", "wayland-client", @@ -641,12 +683,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -662,6 +698,20 @@ dependencies = [ "libc", ] +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.6", +] + [[package]] name = "clang-sys" version = "1.8.1" @@ -1067,6 +1117,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + [[package]] name = "drm" version = "0.9.0" @@ -1263,7 +1319,7 @@ dependencies = [ "log", "lru", "rgb", - "rustybuzz 0.14.1", + "rustybuzz", "slotmap", "unicode-bidi", "unicode-segmentation", @@ -1330,31 +1386,31 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree", + "roxmltree 0.19.0", ] [[package]] name = "fontdb" -version = "0.16.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" dependencies = [ "fontconfig-parser", "log", "memmap2 0.9.4", "slotmap", "tinyvec", - "ttf-parser 0.20.0", + "ttf-parser 0.21.1", ] [[package]] name = "fontdue" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9099a2f86b8e674b75d03ff154b3fe4c5208ed249ced8d69cc313a9fa40bb488" +checksum = "efe23d02309319171d00d794c9ff48d4f903c0e481375b1b04b017470838af04" dependencies = [ "hashbrown", - "ttf-parser 0.20.0", + "ttf-parser 0.21.1", ] [[package]] @@ -1505,16 +1561,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "gethostname" version = "0.4.3" @@ -1577,55 +1623,56 @@ dependencies = [ [[package]] name = "glutin" -version = "0.31.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" +checksum = "2491aa3090f682ddd920b184491844440fdd14379c7eef8f5bc10ef7fb3242fd" dependencies = [ "bitflags 2.6.0", - "cfg_aliases 0.1.1", + "cfg_aliases", "cgl", "core-foundation", "dispatch", "glutin_egl_sys", "glutin_glx_sys", "glutin_wgl_sys", - "icrate 0.0.4", "libloading 0.8.4", - "objc2 0.4.1", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", - "raw-window-handle 0.5.2", + "raw-window-handle", "wayland-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", ] [[package]] name = "glutin-winit" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" dependencies = [ - "cfg_aliases 0.1.1", + "cfg_aliases", "glutin", - "raw-window-handle 0.5.2", + "raw-window-handle", "winit", ] [[package]] name = "glutin_egl_sys" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" +checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827" dependencies = [ "gl_generator", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "glutin_glx_sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" +checksum = "9c2b2d3918e76e18e08796b55eb64e8fe6ec67d5a6b2e2a7e2edce224ad24c63" dependencies = [ "gl_generator", "x11-dl", @@ -1633,9 +1680,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" dependencies = [ "gl_generator", ] @@ -1660,12 +1707,6 @@ dependencies = [ "allocator-api2", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1699,13 +1740,29 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "i-slint-backend-android-activity" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e6ec0aff7dfb83f6aed421aebe7133e907c790f194af43ff0d0590ae3e385a" +dependencies = [ + "android-activity 0.5.2", + "android-activity 0.6.0", + "i-slint-core", + "i-slint-renderer-skia", + "jni", + "ndk 0.9.0", + "raw-window-handle", +] + [[package]] name = "i-slint-backend-linuxkms" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734d8fb9fe4ec1e16b037fed68da4d41f2a61ac4114f7cff22c4df242771fb08" +checksum = "74b69e54acd5ff0e84e97ac3d423a6ff55b62c3e7245dc30e47af360ab214ab7" dependencies = [ - "calloop", + "bytemuck", + "calloop 0.12.4", "drm", "gbm", "gbm-sys", @@ -1714,16 +1771,17 @@ dependencies = [ "i-slint-core", "i-slint-renderer-femtovg", "input", + "memmap2 0.9.4", "nix 0.27.1", - "raw-window-handle 0.5.2", + "raw-window-handle", "xkbcommon", ] [[package]] name = "i-slint-backend-qt" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39bdf955542e1ae8ebb0f7f5bd88d310d4f375cc84d9ca77db8d897b8f00d2f9" +checksum = "9c18d73d0225a3b07920d72f9780a906d363a7a12d1ad899d09824f5b0e185a7" dependencies = [ "const-field-offset", "cpp", @@ -1741,9 +1799,9 @@ dependencies = [ [[package]] name = "i-slint-backend-selector" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb82314416726feb9b4b67e369df1f9ca5a2286a57a3a8ba1101ac59dc047b9a" +checksum = "0a22906eb0d7f3cd829eb05cdee0b06e724465e4245d72feeabb69d41ea3189e" dependencies = [ "cfg-if", "i-slint-backend-linuxkms", @@ -1755,15 +1813,15 @@ dependencies = [ [[package]] name = "i-slint-backend-winit" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714c7d4f0f7536dd278f935b3aa57224b8f4458ebc96ecdf02aa916d11dbb63d" +checksum = "1142d0fadd7d669256391e727933dd401cca1e0f2ab7be51dbd8eb3171261b55" dependencies = [ "accesskit", "accesskit_winit", "bytemuck", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "cocoa", "const-field-offset", "copypasta", @@ -1779,7 +1837,7 @@ dependencies = [ "lyon_path", "once_cell", "pin-weak", - "raw-window-handle 0.5.2", + "raw-window-handle", "rgb", "scoped-tls-hkt", "scopeguard", @@ -1791,9 +1849,9 @@ dependencies = [ [[package]] name = "i-slint-common" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98770ce4f006a76efa0c728857a29fdca2dcad5dc0442f0aa786a28bbf9dcab1" +checksum = "54cce93c4c91a4320beee73f6a561a68194136cc7fe1460d3f136f8a2b0b18bf" dependencies = [ "cfg-if", "derive_more", @@ -1803,9 +1861,9 @@ dependencies = [ [[package]] name = "i-slint-compiler" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f6ebf56a7c2845868e01e111558b0e2e8164a3514a7fd54ab3edc2b6c3a83" +checksum = "6348bd6697d1d9e6437eaeebfed52b8819d6c5c8b80390941af00b885e57e48e" dependencies = [ "by_address", "codemap", @@ -1815,7 +1873,7 @@ dependencies = [ "fontdue", "i-slint-common", "image 0.24.9", - "itertools", + "itertools 0.13.0", "linked_hash_set", "lyon_extra", "lyon_path", @@ -1833,14 +1891,15 @@ dependencies = [ [[package]] name = "i-slint-core" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40b1c61efe0fc5fbccdb68b23381d312ff6bf0a5cbdd72a6c7e9a669277240d" +checksum = "1eb9d38aceb3f567bd128129f306eed658e230a4c901111fe9e101bc406890c4" dependencies = [ "auto_enums", "bitflags 2.6.0", "bytemuck", "cfg-if", + "chrono", "clru", "const-field-offset", "derive_more", @@ -1859,10 +1918,10 @@ dependencies = [ "pin-project", "pin-weak", "portable-atomic", - "raw-window-handle 0.6.2", + "raw-window-handle", "resvg", "rgb", - "rustybuzz 0.13.0", + "rustybuzz", "scoped-tls-hkt", "scopeguard", "slab", @@ -1874,14 +1933,14 @@ dependencies = [ "vtable", "wasm-bindgen", "web-sys", - "web-time 1.1.0", + "web-time", ] [[package]] name = "i-slint-core-macros" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bed18eb2f3910f85ce4a4bb4c0d770147e76c072a48c845d86ad59c169c24b" +checksum = "c9907c9037c58965ae07d0b51cb44a9ac473e98ccaf23b7d05596096f0e7045d" dependencies = [ "quote", "syn 2.0.71", @@ -1889,9 +1948,9 @@ dependencies = [ [[package]] name = "i-slint-renderer-femtovg" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8c32b7651861322f39d730bf116e9a585a77d6c66fc63a4377c16bf37c869d" +checksum = "ec78259b596b59eaf2dff5f7a320dbcb72f160b7c826cf0bbce7cfa2a3b00ee9" dependencies = [ "cfg-if", "const-field-offset", @@ -1908,10 +1967,9 @@ dependencies = [ "lyon_path", "once_cell", "pin-weak", - "raw-window-handle 0.5.2", "rgb", "scoped-tls-hkt", - "ttf-parser 0.20.0", + "ttf-parser 0.21.1", "unicode-script", "unicode-segmentation", "wasm-bindgen", @@ -1921,13 +1979,13 @@ dependencies = [ [[package]] name = "i-slint-renderer-skia" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b923fc4cff196bc6cd9f32f34b8b73957d0aecd1c43fabb174481eb57cc9b08" +checksum = "ebfc71d47057ee8d2cb6c3f597d7f30cf9e65656b9dfab686bd78b1d142ae39e" dependencies = [ "bytemuck", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "cocoa", "const-field-offset", "core-foundation", @@ -1944,34 +2002,36 @@ dependencies = [ "objc", "once_cell", "pin-weak", - "raw-window-handle 0.5.2", + "raw-window-handle", "scoped-tls-hkt", "skia-safe", "softbuffer", "unicode-segmentation", "vtable", - "windows", + "windows 0.56.0", ] [[package]] -name = "icrate" -version = "0.0.4" +name = "iana-time-zone" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ - "block2 0.3.0", - "dispatch", - "objc2 0.4.1", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core 0.52.0", ] [[package]] -name = "icrate" +name = "iana-time-zone-haiku" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "block2 0.4.0", - "objc2 0.5.2", + "cc", ] [[package]] @@ -2025,6 +2085,15 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" +[[package]] +name = "immutable-chunkmap" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4419f022e55cc63d5bbd6b44b71e1d226b9c9480a47824c706e9d54e5c40c5eb" +dependencies = [ + "arrayvec", +] + [[package]] name = "indexmap" version = "2.2.6" @@ -2093,12 +2162,31 @@ 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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "java-locator" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2abecabd9961c5e01405a6426687fcf1bd94a269927137e4c3cc1a7419b93fd" +dependencies = [ + "glob", + "lazy_static", +] + [[package]] name = "jni" version = "0.21.1" @@ -2108,7 +2196,9 @@ dependencies = [ "cesu8", "cfg-if", "combine", + "java-locator", "jni-sys", + "libloading 0.7.4", "log", "thiserror", "walkdir", @@ -2422,10 +2512,23 @@ dependencies = [ "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys", + "ndk-sys 0.5.0+25.2.9519653", "num_enum", - "raw-window-handle 0.5.2", - "raw-window-handle 0.6.2", + "thiserror", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.6.0", + "jni-sys", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum", + "raw-window-handle", "thiserror", ] @@ -2444,6 +2547,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.26.4" @@ -2537,29 +2649,89 @@ checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", - "objc2-encode 3.0.0", + "objc2-encode", ] [[package]] -name = "objc2" -version = "0.5.2" +name = "objc2-app-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "objc-sys", - "objc2-encode 4.0.3", + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", ] [[package]] -name = "objc2-encode" -version = "3.0.0" +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] [[package]] name = "objc2-encode" @@ -2567,6 +2739,111 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + [[package]] name = "objc_exception" version = "0.1.2" @@ -2867,12 +3144,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -2901,20 +3172,20 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] @@ -2948,9 +3219,9 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "resvg" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2327ced609dadeed3e9702fec3e6b2ddd208758a9268d13e06566c6101ba533" +checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" dependencies = [ "log", "pico-args", @@ -2988,6 +3259,12 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" +[[package]] +name = "roxmltree" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" + [[package]] name = "rustc-hash" version = "1.1.0" @@ -3036,22 +3313,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" -[[package]] -name = "rustybuzz" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88117946aa1bfb53c2ae0643ceac6506337f44887f8c9fbfb43587b1cc52ba49" -dependencies = [ - "bitflags 2.6.0", - "bytemuck", - "smallvec", - "ttf-parser 0.20.0", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", -] - [[package]] name = "rustybuzz" version = "0.14.1" @@ -3103,14 +3364,14 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", "memmap2 0.9.4", - "smithay-client-toolkit", + "smithay-client-toolkit 0.19.2", "tiny-skia", ] @@ -3220,14 +3481,14 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "skia-bindings" -version = "0.72.0" +version = "0.75.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace7c5359ccb009880e65958eaf1e2fa68ee19ada6931300c2f1942f84abf2c3" +checksum = "c06e19e97660b09a381c6eb566849b63556b1a90b8e2c6ba2d146b3f5066847b" dependencies = [ "bindgen", "cc", "flate2", - "heck 0.4.1", + "heck", "lazy_static", "regex", "serde_json", @@ -3237,14 +3498,14 @@ dependencies = [ [[package]] name = "skia-safe" -version = "0.72.0" +version = "0.75.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a4a3df502b317456a34df181ac67a7a6443b0f2e4b883ac220dba1dcb3ce38" +checksum = "ad6e6f369522471b585c99427720b53aad04016fa4314e0a8cf23f17083a4e4c" dependencies = [ "bitflags 2.6.0", "lazy_static", "skia-bindings", - "windows", + "windows 0.56.0", ] [[package]] @@ -3258,11 +3519,12 @@ dependencies = [ [[package]] name = "slint" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0296f559dca60687e5a4208f94ae462f8b410c8e46288b6052747fe34bd7365a" +checksum = "b663a82e33af0ad060dc862b72198cf61f840fbe7e1d26739ec0a43688f60312" dependencies = [ "const-field-offset", + "i-slint-backend-android-activity", "i-slint-backend-qt", "i-slint-backend-selector", "i-slint-core", @@ -3276,9 +3538,9 @@ dependencies = [ [[package]] name = "slint-build" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a2c87c4f1fb80f6a0af909e702ed3d782a1e388de04738be041c8f1dc5dfd5" +checksum = "b722bb80cb249f5552868f7f54c6a9553a6b175999a3fa75bbb19dd6cdd7debf" dependencies = [ "i-slint-compiler", "spin_on", @@ -3288,9 +3550,9 @@ dependencies = [ [[package]] name = "slint-macros" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcd7a3c3bd28d9f5dc8632183d14abccd99985a125a842f991907635485b6768" +checksum = "dc585d4193adbae3cc6cde2e73ee46e56443254d6e210e7e10efa430a8ef2dd3" dependencies = [ "i-slint-compiler", "proc-macro2", @@ -3320,8 +3582,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ "bitflags 2.6.0", - "calloop", - "calloop-wayland-source", + "calloop 0.12.4", + "calloop-wayland-source 0.2.0", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.4", + "rustix 0.38.34", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols 0.31.2", + "wayland-protocols-wlr 0.2.0", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.6.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", @@ -3332,8 +3619,8 @@ dependencies = [ "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", + "wayland-protocols 0.32.2", + "wayland-protocols-wlr 0.3.2", "wayland-scanner", "xkeysym", ] @@ -3345,7 +3632,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c091e7354ea8059d6ad99eace06dd13ddeedbb0ac72d40a9a6e7ff790525882d" dependencies = [ "libc", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.1", "wayland-backend", ] @@ -3370,23 +3657,25 @@ dependencies = [ [[package]] name = "softbuffer" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f266ce2aa23eaaaa4e758ed44495d505d00fb79f359d46f6c1900cb053123b62" +checksum = "d623bff5d06f60d738990980d782c8c866997d9194cfe79ecad00aa2f76826dd" dependencies = [ "as-raw-xcb-connection", "bytemuck", - "cfg_aliases 0.1.1", - "cocoa", + "cfg_aliases", "core-graphics", "fastrand 2.1.0", "foreign-types", "js-sys", "log", "memmap2 0.9.4", - "objc", - "raw-window-handle 0.5.2", - "redox_syscall 0.4.1", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall 0.5.3", "rustix 0.38.34", "tiny-xlib", "wasm-bindgen", @@ -3394,8 +3683,8 @@ dependencies = [ "wayland-client", "wayland-sys", "web-sys", - "windows-sys 0.48.0", - "x11rb 0.12.0", + "windows-sys 0.52.0", + "x11rb", ] [[package]] @@ -3452,7 +3741,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -3701,12 +3990,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "ttf-parser" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" - [[package]] name = "ttf-parser" version = "0.21.1" @@ -3829,9 +4112,9 @@ dependencies = [ [[package]] name = "usvg" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c704361d822337cfc00387672c7b59eaa72a1f0744f62b2a68aa228a0c6927d" +checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" dependencies = [ "base64", "data-url", @@ -3841,8 +4124,8 @@ dependencies = [ "kurbo", "log", "pico-args", - "roxmltree", - "rustybuzz 0.13.0", + "roxmltree 0.20.0", + "rustybuzz", "simplecss", "siphasher", "strict-num", @@ -4031,16 +4314,28 @@ dependencies = [ "wayland-scanner", ] +[[package]] +name = "wayland-protocols" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1794d82d869f38439d15c24b26f06f6c8603d27d47b4f786d5197c99044de415" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + [[package]] name = "wayland-protocols-plasma" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +checksum = "8eb6d270c3fe425ebd636f2017971feb1c0e40e048b3307a71ca342a3c3201ba" dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.32.2", "wayland-scanner", ] @@ -4053,7 +4348,20 @@ dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.31.2", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa43c961473aed713d44c1f616f775186249dfca657f256d8841ca0690366aba" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.32.2", "wayland-scanner", ] @@ -4090,16 +4398,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "web-time" version = "1.1.0" @@ -4153,15 +4451,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "winapi-wsapoll" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eafc5f679c576995526e81635d0cf9695841736712b4e892f87abbe6fed3f28" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -4174,9 +4463,28 @@ version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-core", - "windows-implement", - "windows-interface", + "windows-core 0.54.0", + "windows-implement 0.53.0", + "windows-interface 0.53.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ "windows-targets 0.52.6", ] @@ -4190,6 +4498,18 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement 0.56.0", + "windows-interface 0.56.0", + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-implement" version = "0.53.0" @@ -4201,6 +4521,17 @@ dependencies = [ "syn 2.0.71", ] +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + [[package]] name = "windows-interface" version = "0.53.0" @@ -4212,6 +4543,17 @@ dependencies = [ "syn 2.0.71", ] +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + [[package]] name = "windows-result" version = "0.1.2" @@ -4428,50 +4770,53 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.29.15" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" +checksum = "4225ddd8ab67b8b59a2fee4b34889ebf13c0460c1c3fa297c58e21eb87801b33" dependencies = [ "ahash", - "android-activity", + "android-activity 0.6.0", "atomic-waker", "bitflags 2.6.0", + "block2", "bytemuck", - "calloop", - "cfg_aliases 0.1.1", + "calloop 0.13.0", + "cfg_aliases", + "concurrent-queue", "core-foundation", "core-graphics", "cursor-icon", - "icrate 0.0.4", + "dpi", "js-sys", "libc", - "log", "memmap2 0.9.4", - "ndk", - "ndk-sys", - "objc2 0.4.1", - "once_cell", + "ndk 0.9.0", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", - "raw-window-handle 0.5.2", - "raw-window-handle 0.6.2", - "redox_syscall 0.3.5", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", "rustix 0.38.34", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.19.2", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.32.2", "wayland-protocols-plasma", "web-sys", - "web-time 0.2.4", - "windows-sys 0.48.0", + "web-time", + "windows-sys 0.52.0", "x11-dl", - "x11rb 0.13.1", + "x11rb", "xkbcommon-dl", ] @@ -4509,7 +4854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98785a09322d7446e28a13203d2cae1059a0dd3dfb32cb06d0a225f023d8286" dependencies = [ "libc", - "x11rb 0.13.1", + "x11rb", ] [[package]] @@ -4523,23 +4868,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" -dependencies = [ - "as-raw-xcb-connection", - "gethostname 0.3.0", - "libc", - "libloading 0.7.4", - "nix 0.26.4", - "once_cell", - "winapi", - "winapi-wsapoll", - "x11rb-protocol 0.12.0", -] - [[package]] name = "x11rb" version = "0.13.1" @@ -4547,21 +4875,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ "as-raw-xcb-connection", - "gethostname 0.4.3", + "gethostname", "libc", "libloading 0.8.4", "once_cell", "rustix 0.38.34", - "x11rb-protocol 0.13.1", -] - -[[package]] -name = "x11rb-protocol" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" -dependencies = [ - "nix 0.26.4", + "x11rb-protocol", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 45037da..4573607 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,42 @@ [package] name = "Rust-Calculator" -version = "8.0.0" +version = "9.0.0" edition = "2021" build = "build.rs" description = "A simple calculator I made in rust." +[build-dependencies] +slint-build = "1.7.1" + +[lib] +crate-type = ["cdylib"] + [dependencies] -slint = "1.6" +slint = { version = "1.7.1", features = ["backend-android-activity-06"] } + + -[build-dependencies] -slint-build = "1.6" [package.metadata.bundle] name = "Rust Calculator" identifier = "io.github.ExoticDG.Rust-Calculator" -icon = ["./icon.png", "./icon.png"] \ No newline at end of file +icon = ["./icon.png", "./icon@2x.png"] + + + +[package.metadata.android] +# Name for final APK file. +# Defaults to package name. +apk_name = "Rust Calculator" + +[package.metadata.android.application] + +# Virtual path your application's icon for any mipmap level. +# If not specified, an icon will not be included in the APK. +# icon = "@mipmap/ic_launcher" + +# See https://developer.android.com/guide/topics/manifest/application-element#label +# +# Defaults to the compiled artifact's name. +label = "Rust Calculator" \ No newline at end of file diff --git a/Executable-Files/Rust-Calculator V9.0.0 Linux b/Executable-Files/Rust-Calculator V9.0.0 Linux new file mode 100755 index 0000000..be4b552 Binary files /dev/null and b/Executable-Files/Rust-Calculator V9.0.0 Linux differ diff --git a/README.md b/README.md index d0cccea..1005d50 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,93 @@ +![logo/icon for rust calc](/icon.png) + +# Rust-Calculator + A simple calculator I made in Rust. +## Usage + [Dropbox File Download](https://www.dropbox.com/scl/fo/v65uvyfaletwsikna5m57/AE5xTG4bKB2_DL0ocXvFZkg?rlkey=4gbqwfq8ofolgu4hbzg99wz8z&st=21n8n7hd&dl=0) To use this calculator on Windows (tested on windows 11) download the Windows executable and left click it twice (installer not available). To use the Linux version (tested on kubuntu) download the Linux executable and right click on the file. you then want to select run in Konsole (on different distributions of Linux this might say console or terminal). For newer versions (8.0.0 and up) just left click it twice for the exactable or do the same thing for the debian package and follow the installation instructions look for the program in the start menu and launch it by clicking it. -Feel free to make suggestions in the discussions tab and report any errors or bugs the the issues tab. \ No newline at end of file +Feel free to make suggestions in the discussions tab and report any errors or bugs the the issues tab. + +### NOTICE +I will no longer be updating the Windows files for smaller updates like V6.5.0. I will only update windows to main releases like V9.0.0. If you have a specific version you want windows updated to please post it in the dedicated discussion. + +## Dev For LINUX + +* Compile & run dev mode Linux + + ```bash + > cargo run + ``` + +* Compile Android app & run in emulator + + * Start Android Studio (`studio.sh`). Go to 'Virtual Device Manager'. Select a device to emulate and start the device (play button). + + ```bash + > cargo apk run --target aarch64-linux-android --lib + ``` + +## Dev Setup For LINUX + +### Pre-req + +```bash +> sudo apt update +> sudo apt install build-essential curl +``` + +### Install Rust + +```bash +> curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh +``` + +### Add Android build target + +```bash +> rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android +``` + +### Install Cargo-Apk + +https://github.com/rust-mobile/cargo-apk + +```bash +> cargo install cargo-apk +``` + +## Setup Android SDK Environment For LINUX + +https://developer.android.com/studio + +1. Download & install Android Studio + 1. Unpack the Android Studio distribution archive that you downloaded where you wish to install the program. Extract `android-studio` to `$HOME`. + 2. To start the application, open a console, cd into `~/android-studio/bin` and type: `./studio.sh` + This will initialize various configuration files in the configuration directory: `~/.config/Google/AndroidStudio2024.1.` + 3. Go to SDK Manager & install the following: + * Android SDK Platform + * Android SDK Platform-Tools + * NDK (Side by side) + * Android SDK Build-Tools + * Android SDK Command-line Tools + 4. Go to Virtual Device Manager & add a device to emulate. + 5. Edit `~./bashrc`. (modified to make Slint compile to android too) + ```bash + export PATH=$PATH:$HOME/android-studio/bin:$HOME/android-studio/jbr/bin + export JAVA_HOME=$HOME/android-studio/jbr + export ANDROID_HOME="$HOME/Android/Sdk" + export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)" + export ANDROID_NDK_ROOT="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)" + ``` + 6. Restart shell to re-load `~./bashrc` +2. Unknown if this is actually needed + ``` + > sudo apt-get install adb + > sudo agp-get install google-android-platform-tools-installer + ``` diff --git a/build.rs b/build.rs index 0a2d8aa..9239df0 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,6 @@ fn main() { - slint_build::compile("ui/appwindow.slint").unwrap(); + let config = + slint_build::CompilerConfiguration::new() + .with_style("material-dark".into()); + slint_build::compile_with_config("ui/appwindow.slint", config).unwrap(); } diff --git a/icon.png b/icon.png index cee8906..cc1421a 100644 Binary files a/icon.png and b/icon.png differ diff --git a/icon@2x.png b/icon@2x.png new file mode 100644 index 0000000..cc1421a Binary files /dev/null and b/icon@2x.png differ diff --git a/src/calculator.rs b/src/calculator.rs new file mode 100644 index 0000000..ad71ecb --- /dev/null +++ b/src/calculator.rs @@ -0,0 +1,41 @@ +#[allow(dead_code)] +pub fn calculate(sym:String, num1:String, num2:String) -> Result { + + let sym = sym.trim(); + + let problem:String = format!("{num1} {sym} {num2}"); + + println!("calc strings {num1} {num2} {sym}"); + + let n1 = if num1=="3.14" || num1.to_lowercase()=="pi" || num1=="𝜋" { + Ok(std::f64::consts::PI) + } else { + num1.trim().parse::() + } + .map_err(|_e| "Err 3.14: First entry must be a number.".to_owned())?; + + let n2 = if num2=="3.14" || num2.to_lowercase()=="pi" || num2=="𝜋" { + Ok(std::f64::consts::PI) + } else { + num2.trim().parse::() + } + .map_err(|_e| "Err 3.14: Second entry must be a number.".to_owned())?; + + let answer = if sym == "*" { + n1 * n2 + } else if sym == "/" { + n1 / n2 + } else if sym == "-" { + n1 - n2 + } else if sym == "+" { + n1 + n2 + } else { + println!("Sorry. This is not a viable problem. Try again."); + return Err("Err 83254: Not a viable symbol.".to_owned()) + }; + + println!("The answer is {}", answer); + + let result = format!("Answer == {} \n Problem == {}", answer, problem); + Ok(result) +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..8d339ec --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,26 @@ +slint::include_modules!(); + +mod calculator; + +#[cfg(target_os = "android")] +#[no_mangle] +fn android_main(app: slint::android::AndroidApp) { + slint::android::init(app).unwrap(); + + let ui = AppWindow::new().unwrap(); + ui.on_calc({ + let ui_handle = ui.as_weak(); + move || { + let ui = ui_handle.unwrap(); + let n1 = ui.get_num1ui(); + let n2 = ui.get_num2ui(); + let s = ui.get_symui(); + let ans = match calculator::calculate(s.to_string(), n1.to_string(), n2.to_string()) { + Ok(x) => x, + Err(e) => e, + }; + ui.set_result(ans.into()); + } + }); + ui.run().unwrap(); +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 21a829d..a7d3d16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,34 @@ - -// use std::{env::{self,}, io,}; slint::include_modules!(); +mod calculator; +use calculator::calculate; + +#[cfg(any(target_os = "windows", target_os = "linux"))] +fn main() -> Result<(), slint::PlatformError> { + // os(); + let ui = AppWindow::new()?; + ui.on_calc({ + let ui_handle = ui.as_weak(); + move || { + let ui = ui_handle.unwrap(); + let n1 = ui.get_num1ui(); + let n2 = ui.get_num2ui(); + let s = ui.get_symui(); + + let ans = match calculate(s.to_string(), n1.to_string(), n2.to_string()) { + Ok(x) => x, + Err(e) => e, + }; + ui.set_result(ans.into()); + } + }); + let _ = ui.run(); + ui.run()?; + + Ok(()) +} + + /* fn os() { let mut ostype = String::new(); @@ -39,66 +66,4 @@ fn os() { } } } -*/ - -fn main() -> Result<(), slint::PlatformError> { - // os(); - let ui = AppWindow::new()?; - ui.on_calc({ - let ui_handle = ui.as_weak(); - move || { - let ui = ui_handle.unwrap(); - let n1 = ui.get_num1ui(); - let n2 = ui.get_num2ui(); - let s = ui.get_symui(); - - let ans = calculate(s.to_string(), n1.to_string(), n2.to_string()); - ui.set_result(ans.into()); - } - - - }); - ui.run(); - - Ok(()) -} - - -fn calculate(sym:String, num1:String, num2:String) -> String { - let mut answer:f64 = 0.0; - let problem:String = format!("{num1} {sym} {num2}"); - - println!("calc strings {num1} {num2} {sym}"); - - let n1 = if num1=="3.14" || num1.to_lowercase()=="pi" || num1=="𝜋" { - std::f64::consts::PI - } else { - num1.trim().parse::().unwrap() - }; - - let n2 = if num2=="3.14" || num2.to_lowercase()=="pi" || num2=="𝜋" { - std::f64::consts::PI - } else { - num2.trim().parse::().unwrap() - }; - - - if sym == "*" { - answer = n1 * n2; - println!("The answer is {}", answer); - } else if sym == "/" { - answer = n1 / n2; - println!("The answer is {}", answer); - } else if sym == "-" { - answer = n1 - n2; - println!("The answer is {}", answer); - } else if sym == "+" { - answer = n1 + n2; - println!("The answer is {}", answer); - } else { - println!("Sorry. This is not a viable problem. Try again.") - }; - - let result = format!("Answer == {} \n Problem == {}", answer, problem); - result -} +*/ \ No newline at end of file diff --git a/ui/appwindow.slint b/ui/appwindow.slint index e9b97e0..909e42f 100644 --- a/ui/appwindow.slint +++ b/ui/appwindow.slint @@ -1,14 +1,7 @@ import { GridBox, Button, LineEdit, ListView, Switch, VerticalBox} from "std-widgets.slint"; - - - - export component AppWindow inherits Window { - // callback calculate_num1(string); - // callback calculate_num2(string); - // callback calculate_sym(string); callback calc(); in property result: ""; @@ -16,14 +9,6 @@ export component AppWindow inherits Window { out property num2ui: ""; out property symui: ""; - -// function calculate(num1ui:string, num2ui:string, symui:string) { -// // calculate_num1(num1ui); -// // calculate_num2(num2ui); -// // calculate_sym(symui); -// calc(num1ui, num2ui, symui); -// } - background: #313e50; GridBox { padding:40px; @@ -32,18 +17,7 @@ export component AppWindow inherits Window { VerticalBox { width: 300px; height: 60px; - // for data in [ - // { text: root.result , - // color: #d7a91f, - // bg: #1c232d, - // font-weight: 600, - // font-size: 50}, - // ] : Rectangle { - // x: 0; - // height: 30px; - // background: data.bg; - // width: parent.width; - // } + Rectangle { x: 0; height: 30px; @@ -102,24 +76,3 @@ export component AppWindow inherits Window { } } } - - - - - -/* -in-out property counter: 42; -callback request-increase-value(); -VerticalBox { - Text { - text: "Counter: \{root.counter}"; - } - - Button { - text: "Increase value"; - clicked => { - root.request-increase-value(); - } - } -} -*/ \ No newline at end of file