diff options
author | metamuffin <yvchraiqi@protonmail.com> | 2022-08-17 17:48:42 +0200 |
---|---|---|
committer | metamuffin <yvchraiqi@protonmail.com> | 2022-08-17 17:48:42 +0200 |
commit | 9856b281b429fa3ba13b64f6c6cd99b3d05d1a2f (patch) | |
tree | dc576c31200c1059d658915688cca1fd03ef9424 | |
parent | 39e9e403cddbb72439a9b141aac14c434df3a745 (diff) | |
download | karlender-9856b281b429fa3ba13b64f6c6cd99b3d05d1a2f.tar karlender-9856b281b429fa3ba13b64f6c6cd99b3d05d1a2f.tar.bz2 karlender-9856b281b429fa3ba13b64f6c6cd99b3d05d1a2f.tar.zst |
modularize interfaces
-rw-r--r-- | Cargo.lock | 958 | ||||
-rw-r--r-- | karld/Cargo.toml | 7 | ||||
-rw-r--r-- | karld/src/demo.rs | 93 | ||||
-rw-r--r-- | karld/src/interface/mod.rs | 10 | ||||
-rw-r--r-- | karld/src/interface/unix.rs (renamed from karld/src/interface.rs) | 8 | ||||
-rw-r--r-- | karld/src/interface/websocket.rs | 46 | ||||
-rw-r--r-- | karld/src/main.rs | 101 | ||||
-rw-r--r-- | karlgui/src/views/calendar.rs | 168 |
8 files changed, 1131 insertions, 260 deletions
@@ -26,7 +26,7 @@ checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ "getrandom", "once_cell", - "version_check", + "version_check 0.9.4", ] [[package]] @@ -66,13 +66,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc120354d1b5ec6d7aaf4876b602def75595937b5e15d356eb554ab5177e08bb" dependencies = [ "clipboard-win", - "log", + "log 0.4.17", "objc", "objc-foundation", "objc_id", "parking_lot 0.12.1", "thiserror", - "winapi", + "winapi 0.3.9", "x11rb", ] @@ -90,7 +90,16 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "autocfg" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.1.0", ] [[package]] @@ -100,6 +109,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] +name = "base64" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" +dependencies = [ + "byteorder", + "safemem", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +dependencies = [ + "byteorder", +] + +[[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -112,12 +140,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] name = "bumpalo" version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] name = "bytemuck" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -138,6 +193,22 @@ dependencies = [ ] [[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "iovec", +] + +[[package]] name = "bytes" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -149,7 +220,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" dependencies = [ - "log", + "log 0.4.17", "nix", ] @@ -199,7 +270,7 @@ dependencies = [ "serde", "time", "wasm-bindgen", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -249,7 +320,16 @@ checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" dependencies = [ "error-code", "str-buf", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", ] [[package]] @@ -289,7 +369,7 @@ version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ - "bytes", + "bytes 1.2.1", "memchr", ] @@ -382,7 +462,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils", + "crossbeam-utils 0.8.8", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg 1.1.0", + "cfg-if 0.1.10", + "lazy_static", ] [[package]] @@ -437,6 +528,15 @@ dependencies = [ ] [[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array", +] + +[[package]] name = "dispatch" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -470,7 +570,7 @@ dependencies = [ "glow", "glutin", "js-sys", - "percent-encoding", + "percent-encoding 2.1.0", "tracing", "wasm-bindgen", "wasm-bindgen-futures", @@ -545,7 +645,7 @@ checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", "humantime", - "log", + "log 0.4.17", "regex", "termcolor", ] @@ -576,6 +676,21 @@ dependencies = [ ] [[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -603,7 +718,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", - "percent-encoding", + "percent-encoding 2.1.0", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", ] [[package]] @@ -613,7 +765,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -634,7 +786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ "khronos_api", - "log", + "log 0.4.17", "xml-rs", ] @@ -667,13 +819,13 @@ dependencies = [ "glutin_wgl_sys", "lazy_static", "libloading", - "log", + "log 0.4.17", "objc", "osmesa-sys", "parking_lot 0.11.2", "wayland-client", "wayland-egl", - "winapi", + "winapi 0.3.9", "winit", ] @@ -684,7 +836,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" dependencies = [ "gl_generator", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -744,12 +896,37 @@ dependencies = [ ] [[package]] +name = "httparse" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" + +[[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] +name = "hyper" +version = "0.10.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" +dependencies = [ + "base64 0.9.3", + "httparse", + "language-tags", + "log 0.3.9", + "mime", + "num_cpus", + "time", + "traitobject", + "typeable", + "unicase", + "url 1.7.2", +] + +[[package]] name = "iana-time-zone" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -759,7 +936,7 @@ dependencies = [ "core-foundation-sys 0.8.3", "js-sys", "wasm-bindgen", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -770,6 +947,17 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" @@ -785,7 +973,7 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ - "autocfg", + "autocfg 1.1.0", "hashbrown", ] @@ -802,6 +990,15 @@ dependencies = [ ] [[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] name = "itoa" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -816,7 +1013,7 @@ dependencies = [ "cesu8", "combine", "jni-sys", - "log", + "log 0.4.17", "thiserror", "walkdir", ] @@ -845,8 +1042,8 @@ dependencies = [ "crossbeam-channel", "env_logger", "karlcommon", - "log", - "rand", + "log 0.4.17", + "rand 0.8.5", "serde", "serde_json", ] @@ -868,9 +1065,10 @@ dependencies = [ "env_logger", "karlcommon", "lazy_static", - "log", + "log 0.4.17", "serde", "serde_json", + "websocket", ] [[package]] @@ -884,17 +1082,33 @@ dependencies = [ "egui_extras", "env_logger", "karlcommon", - "log", + "log 0.4.17", "serde_json", ] [[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] name = "khronos_api" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" + +[[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -913,7 +1127,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if 1.0.0", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", ] [[package]] @@ -922,12 +1145,21 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ - "autocfg", + "autocfg 1.1.0", "scopeguard", ] [[package]] name = "log" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +dependencies = [ + "log 0.4.17", +] + +[[package]] +name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" @@ -951,6 +1183,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -971,7 +1209,16 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg", + "autocfg 1.1.0", +] + +[[package]] +name = "mime" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +dependencies = [ + "log 0.3.9", ] [[package]] @@ -982,17 +1229,66 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log 0.4.17", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", - "log", + "log 0.4.17", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys", ] [[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "native-tls" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +dependencies = [ + "lazy_static", + "libc", + "log 0.4.17", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] name = "ndk" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1032,7 +1328,7 @@ checksum = "c71bee8ea72d685477e28bd004cfe1bf99c754d688cd78cad139eae4089484d4" dependencies = [ "lazy_static", "libc", - "log", + "log 0.4.17", "ndk 0.5.0", "ndk-context", "ndk-macro", @@ -1047,7 +1343,7 @@ checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" dependencies = [ "lazy_static", "libc", - "log", + "log 0.4.17", "ndk 0.6.0", "ndk-context", "ndk-macro", @@ -1083,6 +1379,17 @@ dependencies = [ ] [[package]] +name = "net2" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + +[[package]] name = "nix" version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1117,7 +1424,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg", + "autocfg 1.1.0", "num-traits", ] @@ -1127,7 +1434,17 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg", + "autocfg 1.1.0", +] + +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", ] [[package]] @@ -1187,6 +1504,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "openssl" +version = "0.10.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" +dependencies = [ + "autocfg 1.1.0", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] name = "os_str_bytes" version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1212,12 +1580,23 @@ dependencies = [ [[package]] name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.6.2", + "rustc_version", +] + +[[package]] +name = "parking_lot" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api", + "lock_api 0.4.7", "parking_lot_core 0.8.5", ] @@ -1227,12 +1606,27 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api", + "lock_api 0.4.7", "parking_lot_core 0.9.3", ] [[package]] name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "rustc_version", + "smallvec 0.6.14", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" @@ -1240,9 +1634,9 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall", - "smallvec", - "winapi", + "redox_syscall 0.2.16", + "smallvec 1.9.0", + "winapi 0.3.9", ] [[package]] @@ -1253,13 +1647,19 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", - "smallvec", + "redox_syscall 0.2.16", + "smallvec 1.9.0", "windows-sys", ] [[package]] name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" + +[[package]] +name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" @@ -1303,7 +1703,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "version_check", + "version_check 0.9.4", ] [[package]] @@ -1314,7 +1714,7 @@ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "version_check", + "version_check 0.9.4", ] [[package]] @@ -1337,13 +1737,42 @@ dependencies = [ [[package]] name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.8", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi 0.3.9", +] + +[[package]] +name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.3.1", ] [[package]] @@ -1353,11 +1782,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.3", ] [[package]] name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" @@ -1366,6 +1810,68 @@ dependencies = [ ] [[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi 0.3.9", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.9", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] name = "raw-window-handle" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1375,6 +1881,21 @@ dependencies = [ ] [[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] name = "redox_syscall" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1401,12 +1922,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] name = "ryu" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] +name = "safemem" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" + +[[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1416,6 +1961,16 @@ dependencies = [ ] [[package]] +name = "schannel" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +dependencies = [ + "lazy_static", + "windows-sys", +] + +[[package]] name = "scoped-tls" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1428,6 +1983,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] +name = "security-framework" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +dependencies = [ + "bitflags", + "core-foundation 0.9.3", + "core-foundation-sys 0.8.3", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +dependencies = [ + "core-foundation-sys 0.8.3", + "libc", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] name = "serde" version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1459,6 +2052,18 @@ dependencies = [ ] [[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + +[[package]] name = "shared_library" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1469,12 +2074,30 @@ dependencies = [ ] [[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg 1.1.0", +] + +[[package]] name = "slotmap" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" dependencies = [ - "version_check", + "version_check 0.9.4", +] + +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", ] [[package]] @@ -1493,7 +2116,7 @@ dependencies = [ "calloop", "dlib", "lazy_static", - "log", + "log 0.4.17", "memmap2", "nix", "pkg-config", @@ -1526,6 +2149,20 @@ dependencies = [ ] [[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "libc", + "redox_syscall 0.2.16", + "remove_dir_all", + "winapi 0.3.9", +] + +[[package]] name = "termcolor" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1568,7 +2205,7 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1587,6 +2224,92 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] +name = "tokio-codec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +dependencies = [ + "bytes 0.4.12", + "futures", + "tokio-io", +] + +[[package]] +name = "tokio-executor" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures", +] + +[[package]] +name = "tokio-io" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +dependencies = [ + "bytes 0.4.12", + "futures", + "log 0.4.17", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures", + "lazy_static", + "log 0.4.17", + "mio 0.6.23", + "num_cpus", + "parking_lot 0.9.0", + "slab", + "tokio-executor", + "tokio-io", + "tokio-sync", +] + +[[package]] +name = "tokio-sync" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +dependencies = [ + "fnv", + "futures", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +dependencies = [ + "bytes 0.4.12", + "futures", + "iovec", + "mio 0.6.23", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-tls" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" +dependencies = [ + "futures", + "native-tls", + "tokio-io", +] + +[[package]] name = "toml" version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1628,12 +2351,39 @@ dependencies = [ ] [[package]] +name = "traitobject" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" + +[[package]] name = "ttf-parser" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" [[package]] +name = "typeable" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" + +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + +[[package]] +name = "unicase" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +dependencies = [ + "version_check 0.1.5", +] + +[[package]] name = "unicode-bidi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1656,17 +2406,40 @@ dependencies = [ [[package]] name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +dependencies = [ + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", +] + +[[package]] +name = "url" version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", - "idna", + "idna 0.2.3", "matches", - "percent-encoding", + "percent-encoding 2.1.0", ] [[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" + +[[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1679,7 +2452,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi", + "winapi 0.3.9", "winapi-util", ] @@ -1712,7 +2485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" dependencies = [ "bumpalo", - "log", + "log 0.4.17", "once_cell", "proc-macro2", "quote", @@ -1785,7 +2558,7 @@ checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" dependencies = [ "nix", "once_cell", - "smallvec", + "smallvec 1.9.0", "wayland-sys", ] @@ -1862,10 +2635,51 @@ checksum = "fc6a3cffdb686fbb24d9fb8f03a213803277ed2300f11026a3afe1f108dc021b" dependencies = [ "jni", "ndk-glue 0.6.2", - "url", + "url 2.2.2", "web-sys", "widestring", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "websocket" +version = "0.26.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92aacab060eea423e4036820ddd28f3f9003b2c4d8048cbda985e5a14e18038d" +dependencies = [ + "bytes 0.4.12", + "futures", + "hyper", + "native-tls", + "rand 0.6.5", + "tokio-codec", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-tls", + "unicase", + "url 1.7.2", + "websocket-base", +] + +[[package]] +name = "websocket-base" +version = "0.26.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aec794b07318993d1db16156d5a9c750120597a5ee40c6b928d416186cb138" +dependencies = [ + "base64 0.10.1", + "bitflags", + "byteorder", + "bytes 0.4.12", + "futures", + "native-tls", + "rand 0.6.5", + "sha-1", + "tokio-codec", + "tokio-io", + "tokio-tcp", + "tokio-tls", ] [[package]] @@ -1876,6 +2690,12 @@ checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" [[package]] name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" @@ -1885,6 +2705,12 @@ dependencies = [ ] [[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1896,7 +2722,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1905,7 +2731,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1972,25 +2798,35 @@ dependencies = [ "instant", "lazy_static", "libc", - "log", - "mio", + "log 0.4.17", + "mio 0.8.4", "ndk 0.5.0", "ndk-glue 0.5.2", "ndk-sys 0.2.2", "objc", "parking_lot 0.11.2", - "percent-encoding", + "percent-encoding 2.1.0", "raw-window-handle", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", "wayland-protocols", "web-sys", - "winapi", + "winapi 0.3.9", "x11-dl", ] [[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] name = "x11-dl" version = "2.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2009,7 +2845,7 @@ checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" dependencies = [ "gethostname", "nix", - "winapi", + "winapi 0.3.9", "winapi-wsapoll", ] diff --git a/karld/Cargo.toml b/karld/Cargo.toml index b797dc9..9e2d926 100644 --- a/karld/Cargo.toml +++ b/karld/Cargo.toml @@ -14,3 +14,10 @@ crossbeam-channel = "0.5.4" serde_json = "1.0.81" chrono = "0.4.19" lazy_static = "1.4.0" + +websocket = { version = "0.26.5", optional = true } + +[features] +default = ["websocket", "unix"] +websocket = ["dep:websocket"] +unix = [] diff --git a/karld/src/demo.rs b/karld/src/demo.rs new file mode 100644 index 0000000..fb5b43a --- /dev/null +++ b/karld/src/demo.rs @@ -0,0 +1,93 @@ +use karlcommon::{Task, Schedule, Condition, Property}; + +use crate::TASKS; + +pub fn load_demo() { + TASKS.write().unwrap().insert( + 0, + Task { + id: 0, + name: "Mittagessen im Februar".to_string(), + description: None, + tags: vec!["Essen".to_string(), "Unwichtig".to_string()], + schedule: Schedule::Condition(Condition::And(vec![ + Condition::Equal { + modulus: None, + prop: Property::Monthofyear, + value: 1, + }, + Condition::Equal { + modulus: None, + prop: Property::Hour, + value: 12, + }, + ])), + }, + ); + TASKS.write().unwrap().insert( + 1, + Task { + id: 1, + name: "Abendessen oder Frühstück".to_string(), + description: Some("Nom nom nom".to_string()), + tags: vec!["Essen".to_string()], + schedule: Schedule::Condition(Condition::Or(vec![ + Condition::Equal { + modulus: None, + prop: Property::Hour, + value: 18, + }, + Condition::Equal { + modulus: None, + prop: Property::Hour, + value: 7, + }, + ])), + }, + ); + TASKS.write().unwrap().insert( + 2, + Task { + id: 2, + description: None, + name: "Wichtiger termin™".to_string(), + tags: vec![], + schedule: Schedule::Static(1654997366..1655007366), + }, + ); + + TASKS.write().unwrap().insert( + 3, + Task { + id: 3, + description: None, + name: "Staubsaugen".to_string(), + tags: vec!["Unwichtig".to_string()], + schedule: Schedule::Dynamic { + scheduled: None, + duration: 15 * 60, + priority: 2.0, + condition: Condition::Equal { + prop: Property::Monthofyear, + value: 6, + modulus: None, + }, + }, + }, + ); + TASKS.write().unwrap().insert( + 4, + Task { + id: 4, + description: Some("sollte ich wirklich mal machen".to_string()), + name: "Geschirrspüler ausräumen".to_string(), + tags: vec!["Unwichtig".to_string()], + schedule: Schedule::Dynamic { + scheduled: None, + duration: 15 * 60, + priority: 5.0, + condition: Condition::Never, + }, + }, + ); +} diff --git a/karld/src/interface/mod.rs b/karld/src/interface/mod.rs new file mode 100644 index 0000000..38c9895 --- /dev/null +++ b/karld/src/interface/mod.rs @@ -0,0 +1,10 @@ +use std::thread; +mod unix; +mod websocket; + +pub fn start() { + #[cfg(feature = "unix")] + thread::spawn(|| unix::run()); + #[cfg(feature = "websocket")] + thread::spawn(|| websocket::run()); +} diff --git a/karld/src/interface.rs b/karld/src/interface/unix.rs index e8e0b90..8d038d4 100644 --- a/karld/src/interface.rs +++ b/karld/src/interface/unix.rs @@ -1,4 +1,4 @@ -use crate::handle_packet; +use crate::{handle_packet, CLIENT_ID_COUNTER}; use karlcommon::{socket_path, version, ClientboundPacket, ProtoError, ServerboundPacket}; use log::{debug, error, info, warn}; use std::io; @@ -6,19 +6,17 @@ use std::io::{BufRead, BufReader, ErrorKind, Write}; use std::os::unix::net::{UnixListener, UnixStream}; use std::thread; -pub fn network_loop() { +pub fn run() { if socket_path().exists() { info!("remove old socket"); std::fs::remove_file(socket_path()).unwrap(); } let listener = UnixListener::bind(socket_path()).unwrap(); info!("listening."); - let mut id_counter = 0; loop { let (stream, addr) = listener.accept().unwrap(); - let id = id_counter; - id_counter += 1; + let id = CLIENT_ID_COUNTER.fetch_add(1, std::sync::atomic::Ordering::Relaxed); thread::spawn(move || { info!("client connected: {:?}", addr); if let Err(err) = handle_connection(id, stream) { diff --git a/karld/src/interface/websocket.rs b/karld/src/interface/websocket.rs new file mode 100644 index 0000000..b69de20 --- /dev/null +++ b/karld/src/interface/websocket.rs @@ -0,0 +1,46 @@ +use std::thread; +use websocket::sync::Server; +use websocket::OwnedMessage; + +pub fn run() { + let server = Server::bind("127.0.0.1:2794").unwrap(); + + for request in server.filter_map(Result::ok) { + // Spawn a new thread for each connection. + thread::spawn(|| { + if !request.protocols().contains(&"rust-websocket".to_string()) { + request.reject().unwrap(); + return; + } + + let mut client = request.use_protocol("rust-websocket").accept().unwrap(); + + let ip = client.peer_addr().unwrap(); + + println!("Connection from {}", ip); + + let message = OwnedMessage::Text("Hello".to_string()); + client.send_message(&message).unwrap(); + + let (mut receiver, mut sender) = client.split().unwrap(); + + for message in receiver.incoming_messages() { + let message = message.unwrap(); + + match message { + OwnedMessage::Close(_) => { + let message = OwnedMessage::Close(None); + sender.send_message(&message).unwrap(); + println!("Client {} disconnected", ip); + return; + } + OwnedMessage::Ping(ping) => { + let message = OwnedMessage::Pong(ping); + sender.send_message(&message).unwrap(); + } + _ => sender.send_message(&message).unwrap(), + } + } + }); + } +} diff --git a/karld/src/main.rs b/karld/src/main.rs index 22a12f7..2b95cb7 100644 --- a/karld/src/main.rs +++ b/karld/src/main.rs @@ -2,6 +2,7 @@ #![feature(fs_try_exists)] pub mod condition; +pub mod demo; pub mod helper; pub mod interface; pub mod savestate; @@ -11,12 +12,14 @@ use chrono::NaiveDateTime; use condition::ConditionFind; use crossbeam_channel::Sender; use helper::Overlaps; -use interface::network_loop; use karlcommon::{ ClientboundPacket, Condition, Property, ProtoError, Schedule, ServerboundPacket, Task, }; use log::{debug, error, info}; -use std::{collections::HashMap, sync::RwLock}; +use std::{ + collections::HashMap, + sync::{atomic::AtomicU32, RwLock}, +}; use crate::schedule::schedule_dynamic; @@ -26,104 +29,22 @@ fn main() { if let Err(e) = savestate::load() { error!("load failed: {}", e); } - TASKS.write().unwrap().insert( - 0, - Task { - id: 0, - name: "Mittagessen im Februar".to_string(), - description: None, - tags: vec!["Essen".to_string(), "Unwichtig".to_string()], - schedule: Schedule::Condition(Condition::And(vec![ - Condition::Equal { - modulus: None, - prop: Property::Monthofyear, - value: 1, - }, - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 12, - }, - ])), - }, - ); - TASKS.write().unwrap().insert( - 1, - Task { - id: 1, - name: "Abendessen oder Frühstück".to_string(), - description: Some("Nom nom nom".to_string()), - tags: vec!["Essen".to_string()], - schedule: Schedule::Condition(Condition::Or(vec![ - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 18, - }, - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 7, - }, - ])), - }, - ); - TASKS.write().unwrap().insert( - 2, - Task { - id: 2, - description: None, - name: "Wichtiger termin™".to_string(), - tags: vec![], - schedule: Schedule::Static(1654997366..1655007366), - }, - ); - - TASKS.write().unwrap().insert( - 3, - Task { - id: 3, - description: None, - name: "Staubsaugen".to_string(), - tags: vec!["Unwichtig".to_string()], - schedule: Schedule::Dynamic { - scheduled: None, - duration: 15 * 60, - priority: 2.0, - condition: Condition::Equal { - prop: Property::Monthofyear, - value: 6, - modulus: None, - }, - }, - }, - ); - TASKS.write().unwrap().insert( - 4, - Task { - id: 4, - description: Some("sollte ich wirklich mal machen".to_string()), - name: "Geschirrspüler ausräumen".to_string(), - tags: vec!["Unwichtig".to_string()], - schedule: Schedule::Dynamic { - scheduled: None, - duration: 15 * 60, - priority: 5.0, - condition: Condition::Never, - }, - }, - ); std::thread::spawn(move || { std::thread::sleep(std::time::Duration::from_secs_f64(0.1)); schedule_dynamic(); }); - network_loop(); + interface::start(); + + loop { + std::thread::sleep(std::time::Duration::from_secs_f64(100.0)); + } } lazy_static::lazy_static! { static ref TASKS: RwLock<HashMap<u64, Task>> = RwLock::new(HashMap::new()); + static ref CLIENT_ID_COUNTER: AtomicU32 = AtomicU32::new(0); } pub fn handle_packet(client: u32, packet: ServerboundPacket, responder: Sender<ClientboundPacket>) { diff --git a/karlgui/src/views/calendar.rs b/karlgui/src/views/calendar.rs index a145f4a..1e869af 100644 --- a/karlgui/src/views/calendar.rs +++ b/karlgui/src/views/calendar.rs @@ -1,7 +1,7 @@ use crate::{helper::weekday_to_str, Globals}; use chrono::{Datelike, Duration, NaiveDateTime, Timelike}; -use egui::{Color32, Label, Layout, Rect, ScrollArea, Sense, Stroke, Ui, Vec2}; -use egui_extras::{Size, StripBuilder}; +use egui::{Color32, Rect, Sense, Stroke, Ui, Vec2}; +use egui_extras::{Size, TableBuilder}; use std::{collections::BTreeMap, ops::Range}; #[derive(Default)] @@ -24,21 +24,40 @@ impl Calendar { let height = 1500.0; - ScrollArea::vertical().show(ui, |ui| { - StripBuilder::new(ui) - .size(Size::exact(50.0)) - .sizes(Size::remainder(), 7) - .horizontal(|mut ui| { - ui.cell(|ui| { + TableBuilder::new(ui) + .column(Size::exact(50.0)) + .columns(Size::remainder(), 7) + .header(50.0, |mut tr| { + for d in 0..7 { + tr.col(|_| {}); + tr.col(|ui| { + ui.heading(weekday_to_str( + (start_dt + Duration::days(d as i64)) + .date() + .weekday() + .num_days_from_monday() + .into(), + )); + }); + } + }) + .body(|mut tb| { + tb.row(height, |mut tr| { + tr.col(|ui| { for h in 0..24 { - ui.add_sized( - Vec2::new(50.0, height / 24.0), - Label::new(&format!("{h:02}:00")), + let (response, p) = + ui.allocate_painter(Vec2::new(50.0, height), Sense::hover()); + p.text( + response.rect.min + Vec2::new(0.0, h as f32 / 24.0 * height), + egui::Align2::LEFT_TOP, + format!("{h:02}:00"), + egui::FontId::monospace(15.0), + Color32::from_gray(150), ); } }); for d in 0..7 { - ui.cell(|ui| { + tr.col(|ui| { let time = start_dt + Duration::days(d as i64); let time_end = time + Duration::days(1) - Duration::seconds(1); let instances_here = instances @@ -52,107 +71,48 @@ impl Calendar { ) }) .filter(|(_, l)| l.len() != 0); + ui.horizontal(|ui| { + for (id, rs) in instances_here { + let task = g.tasks.get(id).unwrap(); - ui.vertical(|ui| { - ui.heading(weekday_to_str( - time.date().weekday().num_days_from_monday().into(), - )); - ui.horizontal(|ui| { - for (id, rs) in instances_here { - let task = g.tasks.get(id).unwrap(); + let (rect, response) = ui.allocate_exact_size( + Vec2::new(10.0, height), + Sense::hover(), + ); - let (rect, response) = ui.allocate_exact_size( - Vec2::new(10.0, height), - Sense::hover(), + for r in &rs { + let r = r.start.unwrap_or(time)..r.end.unwrap_or(time_end); + let rect_start = (r.start.hour() as f32 + + (r.start.minute() as f32 / 60.0)) + / 24.0 + * height; + let rect_end = (r.end.hour() as f32 + + (r.end.minute() as f32 / 60.0)) + / 24.0 + * height; + ui.painter().rect( + Rect::from_two_pos( + rect.min + Vec2::new(0.0, rect_start), + rect.min + Vec2::new(10.0, rect_end), + ), + 0.0, + Color32::KHAKI, + Stroke::new(0.0, Color32::WHITE), ); + } - for r in &rs { - let r = - r.start.unwrap_or(time)..r.end.unwrap_or(time_end); - let rect_start = (r.start.hour() as f32 - + (r.start.minute() as f32 / 60.0)) - / 24.0 - * height; - let rect_end = (r.end.hour() as f32 - + (r.end.minute() as f32 / 60.0)) - / 24.0 - * height; - ui.painter().rect( - Rect::from_two_pos( - rect.min + Vec2::new(0.0, rect_start), - rect.min + Vec2::new(10.0, rect_end), - ), - 0.0, - Color32::KHAKI, - Stroke::new(0.0, Color32::WHITE), - ); + response.on_hover_ui_at_pointer(|ui| { + ui.heading(&task.name); + if let Some(d) = &task.description { + ui.label(d); } - - response.on_hover_ui_at_pointer(|ui| { - ui.heading(&task.name); - if let Some(d) = &task.description { - ui.label(d); - } - }); - } - }) + }); + } }); - // }); - // }); }); } }); - }); - - // TableBuilder::new(ui) - // .column(egui_extras::Size::exact(50.0)) - // .columns(egui_extras::Size::remainder(), 7) - // .header(25.0, |mut ui| { - // ui.col(|_| {}); - // for d in 0..7 { - // ui.col(|ui| { - // ui.heading(weekday_to_str(d)); - // }); - // } - // }) - // .body(|mut ui| { - // let mut cols: [Vec<u64>; 7] = - // [vec![], vec![], vec![], vec![], vec![], vec![], vec![]]; - // for h in 0..24 { - // ui.row(height, |mut ui| { - // ui.col(|ui| { - // ui.heading(&format!("{h:02}:00")); - // }); - // for d in 0..7 { - // let _col = &mut cols[d]; - // let time = start_dt + Duration::days(d as i64) + Duration::hours(h); - // let time_end = time + Duration::hours(1) - Duration::seconds(1); - // let instances_here = - // instances.iter().filter(|(_, r)| r.overlaps(time..time_end)); - - // ui.col(|ui| { - // for (id, _) in instances_here { - // let task = g.tasks.get(id).unwrap(); - // let (rect, response) = - // ui.allocate_at_least(Vec2::new(10.0, 50.0), Sense::hover()); - // ui.painter().rect( - // rect, - // 0.0, - // Color32::KHAKI, - // Stroke::new(0.0, Color32::WHITE), - // ); - // response.on_hover_ui_at_pointer(|ui| { - // ui.heading(&task.name); - // if let Some(d) = &task.description { - // ui.label(d); - // } - // }); - // } - // }); - // } - // }) - // } - // }) + }); } } |