diff --git a/Cargo.lock b/Cargo.lock index 6b0029f9e..06a12f53b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,6 +46,26 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "andrew" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" +dependencies = [ + "bitflags", + "line_drawing", + "rusttype 0.7.9", + "walkdir", + "xdg", + "xml-rs", +] + +[[package]] +name = "android_glue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" + [[package]] name = "android_log-sys" version = "0.2.0" @@ -79,14 +99,23 @@ version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +dependencies = [ + "num-traits 0.2.14", +] + [[package]] name = "async-trait" version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -176,8 +205,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "regex", "rustc-hash", "shlex", @@ -200,8 +229,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "regex", "rustc-hash", "shlex", @@ -373,6 +402,21 @@ dependencies = [ "bitflags", ] +[[package]] +name = "cocoa" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1706996401131526e36b3b49f0c4d912639ce110996f3ca144d78946727bce54" +dependencies = [ + "bitflags", + "block", + "core-foundation 0.6.4", + "core-graphics 0.17.3", + "foreign-types", + "libc", + "objc", +] + [[package]] name = "cocoa" version = "0.24.0" @@ -383,7 +427,7 @@ dependencies = [ "block", "cocoa-foundation", "core-foundation 0.9.1", - "core-graphics", + "core-graphics 0.22.2", "foreign-types", "libc", "objc", @@ -438,6 +482,16 @@ dependencies = [ "x11-clipboard", ] +[[package]] +name = "core-foundation" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +dependencies = [ + "core-foundation-sys 0.6.2", + "libc", +] + [[package]] name = "core-foundation" version = "0.7.0" @@ -476,6 +530,18 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +[[package]] +name = "core-graphics" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" +dependencies = [ + "bitflags", + "core-foundation 0.6.4", + "foreign-types", + "libc", +] + [[package]] name = "core-graphics" version = "0.22.2" @@ -537,7 +603,7 @@ dependencies = [ "ndk-glue", "nix 0.20.0", "oboe", - "parking_lot", + "parking_lot 0.11.1", "stdweb", "thiserror", "web-sys", @@ -596,8 +662,8 @@ checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" dependencies = [ "fnv", "ident_case", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "strsim 0.9.3", "syn", ] @@ -609,7 +675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ "darling_core", - "quote", + "quote 1.0.9", "syn", ] @@ -758,8 +824,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -769,8 +835,8 @@ version = "0.99.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -893,7 +959,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" name = "enigo" version = "0.0.14" dependencies = [ - "core-graphics", + "core-graphics 0.22.2", "libc", "log", "objc", @@ -937,8 +1003,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22deed3a8124cff5fa835713fa105621e43bbdc46690c3a6b68328a012d350d4" dependencies = [ "proc-macro-error", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "rustversion", "syn", "synstructure", @@ -951,8 +1017,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcc7f65832b62ed38939f98966824eb6294911c3629b0e9a262bfb80836d9686" dependencies = [ "proc-macro-error", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "rustversion", "syn", "synstructure", @@ -975,7 +1041,7 @@ checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", + "redox_syscall 0.2.7", "winapi 0.3.9", ] @@ -1105,8 +1171,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b" dependencies = [ "proc-macro-hack", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -1309,8 +1375,8 @@ dependencies = [ "itertools", "proc-macro-crate", "proc-macro-error", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -1688,6 +1754,24 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "line_drawing" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" +dependencies = [ + "num-traits 0.2.14", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + [[package]] name = "lock_api" version = "0.4.4" @@ -1751,12 +1835,28 @@ dependencies = [ "libc", ] +[[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.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "memmap2" version = "0.1.0" @@ -1873,8 +1973,8 @@ checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" dependencies = [ "darling", "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -1895,6 +1995,19 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "nix" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" +dependencies = [ + "bitflags", + "cc", + "cfg-if 0.1.10", + "libc", + "void", +] + [[package]] name = "nix" version = "0.17.0" @@ -1970,8 +2083,8 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -2030,8 +2143,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" dependencies = [ "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -2111,6 +2224,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +[[package]] +name = "ordered-float" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" +dependencies = [ + "num-traits 0.2.14", +] + [[package]] name = "pango" version = "0.9.1" @@ -2152,6 +2274,17 @@ dependencies = [ "winapi 0.3.9", ] +[[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.1" @@ -2159,8 +2292,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api", - "parking_lot_core", + "lock_api 0.4.4", + "parking_lot_core 0.8.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]] @@ -2172,8 +2320,8 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall", - "smallvec", + "redox_syscall 0.2.7", + "smallvec 1.6.1", "winapi 0.3.9", ] @@ -2183,6 +2331,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + [[package]] name = "phf" version = "0.7.24" @@ -2273,8 +2427,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", "version_check 0.9.3", ] @@ -2285,8 +2439,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "version_check 0.9.3", ] @@ -2302,13 +2456,22 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + [[package]] name = "proc-macro2" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ - "unicode-xid", + "unicode-xid 0.2.2", ] [[package]] @@ -2408,13 +2571,22 @@ dependencies = [ "webpki", ] +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + [[package]] name = "quote" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.26", ] [[package]] @@ -2604,6 +2776,15 @@ dependencies = [ "rand_core 0.3.1", ] +[[package]] +name = "raw-window-handle" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" +dependencies = [ + "libc", +] + [[package]] name = "rdrand" version = "0.4.0" @@ -2613,6 +2794,12 @@ 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.7" @@ -2629,7 +2816,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ "getrandom 0.2.2", - "redox_syscall", + "redox_syscall 0.2.7", ] [[package]] @@ -2733,6 +2920,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + [[package]] name = "rustdesk" version = "1.1.2" @@ -2742,10 +2938,10 @@ dependencies = [ "cc", "cfg-if 1.0.0", "clap", - "cocoa", + "cocoa 0.24.0", "copypasta", "core-foundation 0.9.1", - "core-graphics", + "core-graphics 0.22.2", "cpal", "crc32fast", "ctrlc", @@ -2809,6 +3005,26 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rusttype" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" +dependencies = [ + "rusttype 0.8.3", +] + +[[package]] +name = "rusttype" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" +dependencies = [ + "approx", + "ordered-float", + "stb_truetype", +] + [[package]] name = "rustversion" version = "1.0.4" @@ -2843,12 +3059,14 @@ dependencies = [ [[package]] name = "sciter-rs" version = "0.5.53" -source = "git+https://github.com/sciter-sdk/rust-sciter?rev=7702fb17290e76606bdd7010a0c3cbb32e85db76#7702fb17290e76606bdd7010a0c3cbb32e85db76" dependencies = [ "lazy_static", "libc", "objc", "objc-foundation", + "raw-window-handle", + "winapi 0.3.9", + "winit", ] [[package]] @@ -2914,6 +3132,21 @@ dependencies = [ "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 = "0.9.15" @@ -2935,8 +3168,8 @@ version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -3003,12 +3236,38 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] + [[package]] name = "smallvec" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +[[package]] +name = "smithay-client-toolkit" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ccb8c57049b2a34d2cc2b203fa785020ba0129d31920ef0d317430adaf748fa" +dependencies = [ + "andrew", + "bitflags", + "dlib 0.4.2", + "lazy_static", + "memmap", + "nix 0.14.1", + "wayland-client 0.21.13", + "wayland-commons 0.21.13", + "wayland-protocols 0.21.13", +] + [[package]] name = "smithay-client-toolkit" version = "0.12.3" @@ -3021,9 +3280,9 @@ dependencies = [ "log", "memmap2", "nix 0.18.0", - "wayland-client", + "wayland-client 0.28.5", "wayland-cursor", - "wayland-protocols", + "wayland-protocols 0.28.5", ] [[package]] @@ -3032,8 +3291,8 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06384dfaf645908220d976ae24ed39f6cf92efecb0225ea0a948e403014de527" dependencies = [ - "smithay-client-toolkit", - "wayland-client", + "smithay-client-toolkit 0.12.3", + "wayland-client 0.28.5", ] [[package]] @@ -3064,6 +3323,15 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "stb_truetype" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" +dependencies = [ + "byteorder", +] + [[package]] name = "stdweb" version = "0.1.3" @@ -3101,8 +3369,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" dependencies = [ "heck", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -3112,9 +3380,9 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "proc-macro2 1.0.26", + "quote 1.0.9", + "unicode-xid 0.2.2", ] [[package]] @@ -3123,10 +3391,10 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", - "unicode-xid", + "unicode-xid 0.2.2", ] [[package]] @@ -3176,7 +3444,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "rand 0.8.3", - "redox_syscall", + "redox_syscall 0.2.7", "remove_dir_all", "winapi 0.3.9", ] @@ -3223,8 +3491,8 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -3268,8 +3536,8 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -3315,8 +3583,8 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", ] @@ -3353,6 +3621,12 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + [[package]] name = "unicode-xid" version = "0.2.2" @@ -3446,8 +3720,8 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", "wasm-bindgen-shared", ] @@ -3458,7 +3732,7 @@ version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" dependencies = [ - "quote", + "quote 1.0.9", "wasm-bindgen-macro-support", ] @@ -3468,8 +3742,8 @@ version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -3481,6 +3755,21 @@ version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" +[[package]] +name = "wayland-client" +version = "0.21.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49963e5f9eeaf637bfcd1b9f0701c99fd5cd05225eb51035550d4272806f2713" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix 0.14.1", + "wayland-commons 0.21.13", + "wayland-scanner 0.21.13", + "wayland-sys 0.21.13", +] + [[package]] name = "wayland-client" version = "0.28.5" @@ -3492,9 +3781,19 @@ dependencies = [ "libc", "nix 0.20.0", "scoped-tls", - "wayland-commons", - "wayland-scanner", - "wayland-sys", + "wayland-commons 0.28.5", + "wayland-scanner 0.28.5", + "wayland-sys 0.28.5", +] + +[[package]] +name = "wayland-commons" +version = "0.21.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c08896768b667e1df195d88a62a53a2d1351a1ed96188be79c196b35bb32ec" +dependencies = [ + "nix 0.14.1", + "wayland-sys 0.21.13", ] [[package]] @@ -3505,8 +3804,8 @@ checksum = "8bd75ae380325dbcff2707f0cd9869827ea1d2d6d534cff076858d3f0460fd5a" dependencies = [ "nix 0.20.0", "once_cell", - "smallvec", - "wayland-sys", + "smallvec 1.6.1", + "wayland-sys 0.28.5", ] [[package]] @@ -3516,10 +3815,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b37e5455ec72f5de555ec39b5c3704036ac07c2ecd50d0bffe02d5fe2d4e65ab" dependencies = [ "nix 0.20.0", - "wayland-client", + "wayland-client 0.28.5", "xcursor", ] +[[package]] +name = "wayland-protocols" +version = "0.21.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afde2ea2a428eee6d7d2c8584fdbe8b82eee8b6c353e129a434cd6e07f42145" +dependencies = [ + "bitflags", + "wayland-client 0.21.13", + "wayland-commons 0.21.13", + "wayland-scanner 0.21.13", + "wayland-sys 0.21.13", +] + [[package]] name = "wayland-protocols" version = "0.28.5" @@ -3527,9 +3839,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95df3317872bcf9eec096c864b69aa4769a1d5d6291a5b513f8ba0af0efbd52c" dependencies = [ "bitflags", - "wayland-client", - "wayland-commons", - "wayland-scanner", + "wayland-client 0.28.5", + "wayland-commons 0.28.5", + "wayland-scanner 0.28.5", +] + +[[package]] +name = "wayland-scanner" +version = "0.21.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3828c568714507315ee425a9529edc4a4aa9901409e373e9e0027e7622b79e" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "xml-rs", ] [[package]] @@ -3538,11 +3861,21 @@ version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389d680d7bd67512dc9c37f39560224327038deb0f0e8d33f870900441b68720" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.26", + "quote 1.0.9", "xml-rs", ] +[[package]] +name = "wayland-sys" +version = "0.21.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520ab0fd578017a0ee2206623ba9ef4afe5e8f23ca7b42f6acfba2f4e66b1628" +dependencies = [ + "dlib 0.4.2", + "lazy_static", +] + [[package]] name = "wayland-sys" version = "0.28.5" @@ -3668,6 +4001,31 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "winit" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e96eb4bb472fa43e718e8fa4aef82f86cd9deac9483a1e1529230babdb394a8" +dependencies = [ + "android_glue", + "backtrace", + "bitflags", + "cocoa 0.18.5", + "core-foundation 0.6.4", + "core-graphics 0.17.3", + "lazy_static", + "libc", + "log", + "objc", + "parking_lot 0.9.0", + "percent-encoding", + "raw-window-handle", + "smithay-client-toolkit 0.4.6", + "wayland-client 0.21.13", + "winapi 0.3.9", + "x11-dl", +] + [[package]] name = "winreg" version = "0.6.2" @@ -3714,6 +4072,18 @@ dependencies = [ "xcb", ] +[[package]] +name = "x11-dl" +version = "2.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" +dependencies = [ + "lazy_static", + "libc", + "maybe-uninit", + "pkg-config", +] + [[package]] name = "xcb" version = "0.9.0" @@ -3733,6 +4103,12 @@ dependencies = [ "nom 6.1.2", ] +[[package]] +name = "xdg" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" + [[package]] name = "xml-rs" version = "0.8.3" diff --git a/Cargo.toml b/Cargo.toml index 16d306829..e36af126e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ cpal = { git = "https://github.com/rustaudio/cpal" } [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] machine-uid = "0.2" mac_address = "1.1" -sciter-rs = { git = "https://github.com/sciter-sdk/rust-sciter", rev = "7702fb17290e76606bdd7010a0c3cbb32e85db76" } +sciter-rs = { path = "libs/rust-sciter" } [target.'cfg(target_os = "windows")'.dependencies] systray = { path = "libs/systray-rs" } diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index f98be4162..72eee9309 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -148,6 +148,17 @@ fn patch(path: PathBuf) -> PathBuf { .into(); #[cfg(target_os = "macos")] return _tmp.replace("Application Support", "Preferences").into(); + #[cfg(target_os = "linux")] + { + if _tmp == "/root" { + if let Ok(output) = std::process::Command::new("whoami").output() { + let user = String::from_utf8_lossy(&output.stdout).to_string().trim().to_owned(); + if user != "root" { + return format!("/home/{}", user).into(); + } + } + } + } } path } @@ -269,11 +280,10 @@ impl Config { } #[cfg(target_os = "linux")] { - if let Some(path) = dirs_next::home_dir().as_mut() { - path.push(format!(".local/share/logs/{}", APP_NAME)); - std::fs::create_dir_all(&path).ok(); - return path.clone(); - } + let mut path = Self::get_home(); + path.push(format!(".local/share/logs/{}", APP_NAME)); + std::fs::create_dir_all(&path).ok(); + return path; } if let Some(path) = Self::path("").parent() { let mut path: PathBuf = path.into(); diff --git a/libs/rust-sciter/.appveyor.yml b/libs/rust-sciter/.appveyor.yml new file mode 100644 index 000000000..151f37d83 --- /dev/null +++ b/libs/rust-sciter/.appveyor.yml @@ -0,0 +1,98 @@ +version: 0.5.0.{build} + +branches: + only: + - master + - travis + +image: + - Visual Studio 2017 + +environment: + matrix: + - TARGET: x86_64-pc-windows-msvc + CHANNEL: stable + ARCH: 64 + + - TARGET: i686-pc-windows-msvc + CHANNEL: stable + ARCH: 32 + + - TARGET: x86_64-pc-windows-msvc + CHANNEL: stable + ARCH: 64skia + + - TARGET: i686-pc-windows-msvc + CHANNEL: stable + ARCH: 32skia + + - TARGET: x86_64-pc-windows-msvc + CHANNEL: stable + ARCH: 64 + FEATURES: --features "dynamic" + + - TARGET: i686-pc-windows-msvc + CHANNEL: stable + ARCH: 32 + FEATURES: --features "dynamic" + + - TARGET: x86_64-pc-windows-msvc + CHANNEL: nightly + ARCH: 64 + + - TARGET: i686-pc-windows-msvc + CHANNEL: nightly + ARCH: 32 + + - TARGET: x86_64-pc-windows-msvc + CHANNEL: 1.38.0 + ARCH: 64 + + - TARGET: i686-pc-windows-msvc + CHANNEL: 1.38.0 + ARCH: 32 + + - TARGET: x86_64-pc-windows-msvc + CHANNEL: 1.38.0 + ARCH: 64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + + +cache: + - C:\Users\appveyor\.cargo\registry + #- C:\projects\deps -> appveyor.yml + #- target + +install: + - cmd: echo Testing sciter%ARCH% with Rust %CHANNEL%. + - cmd: echo Current directory is %APPVEYOR_BUILD_FOLDER% + - cmd: mkdir ..\deps + - curl -sSLo "..\deps\sciter.dll" "https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x%ARCH%/sciter.dll" + - curl -sSLo "..\deps\rustup-init.exe" "https://win.rustup.rs/" + - ..\deps\rustup-init.exe -y --default-host %TARGET% --default-toolchain %CHANNEL% + - cmd: set PATH=%PATH%;C:\Users\appveyor\.cargo\bin;C:\projects\deps + +before_build: + - cmd: cd + - rustc --version + - cargo update + +build_script: + - cmd: echo Building library + - cargo build --release --all %FEATURES% + + - cmd: echo Building examples + - cargo build --example first --verbose + - cargo build --example windowless --features windowless + - cargo build --release --examples %FEATURES% + +test_script: + - cargo run --example first %FEATURES% + - cargo run --example first %FEATURES% + - cargo run --example first %FEATURES% -- C:/projects/deps/sciter.dll + + - cargo test -p sciter-rs %FEATURES% + - cargo test -p sciter-rs %FEATURES% --release + + - cargo test -p sciter-serde %FEATURES% + - cargo test -p sciter-serde %FEATURES% --release diff --git a/libs/rust-sciter/.clippy.toml b/libs/rust-sciter/.clippy.toml new file mode 100644 index 000000000..9f92aa166 --- /dev/null +++ b/libs/rust-sciter/.clippy.toml @@ -0,0 +1 @@ +doc-valid-idents = ["TIScript"] diff --git a/libs/rust-sciter/.editorconfig b/libs/rust-sciter/.editorconfig new file mode 100644 index 000000000..45e1f5cc6 --- /dev/null +++ b/libs/rust-sciter/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig is awesome: http://EditorConfig.org + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.rs] +indent_style = tab +indent_size = 2 +tab_width = 2 + +[*.{yml,toml,md}] +indent_style = space +indent_size = 2 +tab_width = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/libs/rust-sciter/.github/workflows/cargo.yml b/libs/rust-sciter/.github/workflows/cargo.yml new file mode 100644 index 000000000..00ac30dca --- /dev/null +++ b/libs/rust-sciter/.github/workflows/cargo.yml @@ -0,0 +1,115 @@ +name: Build-n-Test + +on: + push: + branches: + - master + - travis + + pull_request: + branches: + - master + +# Look: +# https://github.com/actions/starter-workflows/blob/master/ci/rust.yml +# +# Simple, right? Right. +# But we need to: +# * download a specific Sciter library matching the running OS +# * figure out where to save it +# * add it to the $PATH +# +# yet, +# * in case of macOS realize that it doesn't have Rust installed, so +# * install it manually and don't forget to add cargo and rustc to the $PATH on each step +# * and in case of Linux install additional packages for GTK3 +# +# So, now we're ended up with this ugly script. + +jobs: + fetch: + name: Fetch dependencies + + runs-on: ${{ matrix.os }} + strategy: + matrix: + # macOS doesn't have Rust installed + # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners#macos-1015 + # we will try to install it manually below. + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - name: Environment + shell: bash + env: + RUNNER_CONTEXT: ${{ toJson(runner) }} + SCITER_DEPS: ${{ runner.workspace }} + run: | + echo HOME is "$HOME" + echo workspace is "$SCITER_DEPS" + echo temp is "$TEMP" + echo runner is "$RUNNER_CONTEXT" + echo cargo is at `which cargo` + echo rustc is at `which rustc` + command -v cargo && rustc -vV + echo done + + build: + needs: [fetch] + name: Build and test + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Windows deps + if: runner.os == 'Windows' + # Windows: download sciter library + run: curl -sSLo "%SCITER_DEPS%/sciter.dll" "https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll" + shell: cmd + env: + SCITER_DEPS: ${{ runner.workspace }} + + - name: Linux deps + if: runner.os == 'Linux' + # Linux: download sciter library && install libgtk-3-dev + run: | + curl -so "$SCITER_DEPS/libsciter-gtk.so" "https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so" + sudo apt-get update -y && sudo apt-get install libgtk-3-dev libgtk-3-0 libstdc++-6-pic -y + env: + SCITER_DEPS: ${{ runner.workspace }} + + - name: macOS deps + if: runner.os == 'macOS' + # OSX: download sciter library && install rustup + run: | + curl -so "$SCITER_DEPS/sciter-osx-64.dylib" "https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/sciter-osx-64.dylib" + curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y + test -f $HOME/.cargo/env && source $HOME/.cargo/env + echo cargo is at `which cargo` + echo rustc is at `which rustc` + env: + SCITER_DEPS: ${{ runner.workspace }} + + - name: Build + shell: bash + run: | + test -f $HOME/.cargo/env && source $HOME/.cargo/env + cargo build --all + cargo build --examples + + - name: Tests + shell: bash + run: | + test -f $HOME/.cargo/env && source $HOME/.cargo/env + export PATH="$PATH:$SCITER_DEPS" + cargo run --example first + cargo test -p sciter-rs + cargo test -p sciter-serde + env: + SCITER_DEPS: ${{ runner.workspace }} diff --git a/libs/rust-sciter/.gitignore b/libs/rust-sciter/.gitignore new file mode 100644 index 000000000..387f95a08 --- /dev/null +++ b/libs/rust-sciter/.gitignore @@ -0,0 +1,4 @@ +target +Cargo.lock +.vscode/ +.vs/ diff --git a/libs/rust-sciter/.rustfmt.toml b/libs/rust-sciter/.rustfmt.toml new file mode 100644 index 000000000..192299b3c --- /dev/null +++ b/libs/rust-sciter/.rustfmt.toml @@ -0,0 +1,6 @@ +# `rustfmt --config-help` for formatting options +max_width = 140 +ideal_width = 120 +tab_spaces = 2 +hard_tabs = true +blank_lines_upper_bound = 2 diff --git a/libs/rust-sciter/.travis.yml b/libs/rust-sciter/.travis.yml new file mode 100644 index 000000000..491549cb5 --- /dev/null +++ b/libs/rust-sciter/.travis.yml @@ -0,0 +1,99 @@ +# Based on the "trust" template v0.1.2 +# https://github.com/japaric/trust/tree/v0.1.2 + +dist: xenial +sudo: false +language: rust +compiler: gcc + +os: + - linux + - osx + +rust: + - stable + - nightly + - 1.40.0 + +matrix: + include: + - os: osx + osx_image: xcode8 + - os: osx + osx_image: xcode11 + +branches: + only: + - master + - travis + +notifications: + email: change + + +cache: cargo +before_cache: + # Travis can't cache files that are not readable by "others" + - chmod -R a+r $HOME/.cargo + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + + packages: + - libgtk-3-dev + - libgtk-3-0 + - libstdc++-6-pic + + +before_install: + - set -e + - rustup self update + +install: + - source ~/.cargo/env || true + - export SDK_URL=https://raw.githubusercontent.com/c-smile/sciter-sdk/master + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export SDK_DLL="$TRAVIS_BUILD_DIR/sciter-osx-64.dylib"; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export SDK_DLL="$TRAVIS_BUILD_DIR/libsciter-gtk.so"; fi + + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl -so "$SDK_DLL" $SDK_URL/bin.osx/sciter-osx-64.dylib; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -so "$SDK_DLL" $SDK_URL/bin.lnx/x64/libsciter-gtk.so; fi + +before_script: + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$TRAVIS_BUILD_DIR"; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp "$TRAVIS_BUILD_DIR/sciter-osx-64.dylib" "$TRAVIS_BUILD_DIR/libsciter-osx-64.dylib"; fi + + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TRAVIS_BUILD_DIR"; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export RUSTFLAGS='-C link-arg=-Wl,--unresolved-symbols=ignore-in-shared-libs'; fi + + - export PATH="$PATH:$TRAVIS_BUILD_DIR" + - export LIBRARY_PATH="$LIBRARY_PATH:$TRAVIS_BUILD_DIR" + - export RUST_BACKTRACE=full + + - #ls /usr/lib/x86_64-linux-gnu/libstdc++* + - #strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC + - #file $SDK_DLL + - gcc --version + - rustc --version + +script: + - cargo update + + - cargo build --example first --verbose + - cargo run --example first + - cargo run --example first --features "dynamic" + - cargo run --example first --features "dynamic" -- "$SDK_DLL" + + - cargo build --all + - cargo build --all --release + - cargo build --examples --release + - cargo build --example windowless --features windowless + + - cargo test -p sciter-rs + - cargo test -p sciter-rs --release + + - cargo test -p sciter-serde + - cargo test -p sciter-serde --release + +after_script: set +e diff --git a/libs/rust-sciter/Cargo.toml b/libs/rust-sciter/Cargo.toml new file mode 100644 index 000000000..737df33b6 --- /dev/null +++ b/libs/rust-sciter/Cargo.toml @@ -0,0 +1,111 @@ +[package] +name = "sciter-rs" +version = "0.5.53" +description = "Rust bindings for Sciter - Embeddable HTML/CSS/script engine (cross-platform desktop GUI toolkit). Also capable with DirectX / OpenGL." +keywords = ["gui", "gtk", "cocoa", "opengl", "skia"] +categories = ["gui", "web-programming", "rendering::graphics-api", "api-bindings"] + +authors = ["pravic "] +repository = "https://github.com/sciter-sdk/rust-sciter" +documentation = "https://docs.rs/sciter-rs" +readme = "README.md" +license = "MIT" + +exclude = [".gitignore", ".editorconfig", ".appveyor.yml", "clippy.toml"] + +[badges] +appveyor = { repository = "sciter-sdk/rust-sciter" } +travis-ci = { repository = "sciter-sdk/rust-sciter" } + +maintenance = { status = "passively-maintained" } + +[lib] +name = "sciter" +path = "src/lib.rs" +crate-type = ["rlib"] + +[features] +default = ["dynamic"] + +# Enable nightly compiler features (currently doesn't use any). +nightly = [] + +# Build as a Sciter extension library. +# see "examples/extension" +# note: this feature can't be tested. +extension = [] + +# Load Sciter DLL dynamically from the path specified by `sciter::set_library`. +# Otherwise, links statically to `libsciter-gtk.so` or `sciter-osx-64.dylib`. +dynamic = [] + +# Build this crate specifically for Sciter.Lite versions +# which are incompatible with the regular ones. +windowless = [] + + +[dependencies] +libc = "0.2" +lazy_static = "1.0" + +[target.x86_64-apple-darwin.dependencies] +objc = "0.2" +objc-foundation = "0.1" + +[dev-dependencies] +winit = "0.19" +winapi = { version = "0.3", features = [ + "impl-default", + "winuser", + "wingdi", + "sysinfoapi", +] } +raw-window-handle = "0.3" + +[[example]] +name = "first" +path = "examples/first.rs" + +[[example]] +name = "minimal" +path = "examples/minimal.rs" + +[[example]] +name = "download" +path = "examples/download.rs" + +[[example]] +name = "dom" +path = "examples/dom.rs" + +[[example]] +name = "fire_event" +path = "examples/fire_event.rs" + +[[example]] +name = "interop" +path = "examples/interop.rs" + +[[example]] +name = "threads" +path = "examples/threads.rs" + +[[example]] +name = "archived" +path = "examples/archived.rs" + +[[example]] +name = "video" +path = "examples/video.rs" + +[[example]] +name = "clock" +path = "examples/clock.rs" + +[[example]] +name = "windowless" +path = "examples/windowless.rs" + +[[example]] +name = "som" +path = "examples/som.rs" diff --git a/libs/rust-sciter/LICENSE b/libs/rust-sciter/LICENSE new file mode 100644 index 000000000..11cf6de15 --- /dev/null +++ b/libs/rust-sciter/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2019 pravic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libs/rust-sciter/README.md b/libs/rust-sciter/README.md new file mode 100644 index 000000000..3817eb356 --- /dev/null +++ b/libs/rust-sciter/README.md @@ -0,0 +1,159 @@ +# Rust bindings for Sciter + +[![Build status](https://ci.appveyor.com/api/projects/status/cbrisyh792mmmd08/branch/master?svg=true)](https://ci.appveyor.com/project/pravic/rust-sciter) +[![Build Status](https://img.shields.io/travis/sciter-sdk/rust-sciter/master.svg)](https://travis-ci.org/sciter-sdk/rust-sciter) +[![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.38+-green.svg)](https://github.com/sciter-sdk/rust-sciter/commits/master/.travis.yml) +[![Current Version](https://img.shields.io/crates/v/sciter-rs.svg)](https://crates.io/crates/sciter-rs) +[![Documentation](https://docs.rs/sciter-rs/badge.svg)](https://docs.rs/sciter-rs) +[![License](https://img.shields.io/crates/l/sciter-rs.svg)](https://crates.io/crates/sciter-rs) +[![Join the forums at https://sciter.com/forums](https://img.shields.io/badge/forum-sciter.com-orange.svg)](https://sciter.com/forums) + +Check [this page](https://sciter.com/developers/sciter-sdk-bindings/) for other language bindings (Delphi / D / Go / .NET / Python / Rust). + +---- + + +## Introduction + +Sciter is an embeddable [multiplatform](https://sciter.com/sciter/crossplatform/) HTML/CSS/script engine with GPU accelerated rendering designed to render modern desktop application UI. It's a compact, single dll/dylib/so file (4-8 mb) engine without any additional dependencies. + + +## Screenshots + +Check the [screenshot gallery](https://github.com/oskca/sciter#sciter-desktop-ui-examples) of desktop UI examples +and [DirectX UI integration](https://github.com/pravic/rust-gfx-sciter) via [Rust GFX](https://github.com/gfx-rs/gfx). + + +## Description + +Physically Sciter is a mono library which contains: + +* [HTML and CSS](https://sciter.com/developers/for-web-programmers/) rendering engine based on the H-SMILE core used in [HTMLayout](https://terrainformatica.com/a-homepage-section/htmlayout/), +* JavaScript alike [Scripting engine](https://sciter.com/developers/sciter-docs/) – core of [TIScript](https://sciter.com/developers/for-web-programmers/tiscript-vs-javascript/) which by itself is based on [c-smile](https://c-smile.sourceforge.net/) engine, +* Persistent [Database](https://sciter.com/docs/content/script/Storage.htm) (a.k.a. [JSON DB](https://terrainformatica.com/2006/10/what-the-hell-is-that-json-db/)) based on excellent DB products of [Konstantin Knizhnik](http://garret.ru/databases.html). +* [Graphics](https://sciter.com/docs/content/sciter/Graphics.htm) module that uses native graphics primitives provided by supported platforms: Direct2D on Windows 7 and above, GDI+ on Windows XP, CoreGraphics on MacOS, Cairo on Linux/GTK. Yet there is an option to use built-in [Skia/OpenGL](https://skia.org/) backend on each platform. +* Network communication module, it relies on platform HTTP client primitives and/or [Libcurl](https://curl.haxx.se/). + + +Internally it contains the following modules: + +* **CSS** – CSS parser and the collection of parsed CSS rules, etc. +* **HTML DOM** – HTML parser and DOM tree implementation. +* **layout managers** – collection of various layout managers – text layout, default block layout, flex layouts. Support of positioned floating elements is also here. This module does the layout calculations heavy lifting. This module is also responsible for the rendering of layouts. +* **input behaviors** – a collection of built-in behaviors – code behind "active" DOM elements: ``, `