diff --git a/Cargo.lock b/Cargo.lock index c7250c0..58013e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,6 +35,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "aho-corasick" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +dependencies = [ + "memchr 2.5.0", +] + [[package]] name = "android_system_properties" version = "0.1.4" @@ -44,6 +53,15 @@ dependencies = [ "libc", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "approx" version = "0.5.1" @@ -77,7 +95,18 @@ version = "0.37.0+1.3.209" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "006ca68e0f2b03f22d6fa9f2860f85aed430d257fec20f8879b2145e7c7ae1a6" dependencies = [ - "libloading", + "libloading 0.7.3", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.9", ] [[package]] @@ -86,6 +115,26 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "bindgen" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b242e11a8f446f5fc7b76b37e81d737cabca562a927bd33766dac55b5f1177f" +dependencies = [ + "cexpr", + "cfg-if 0.1.10", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "log 0.3.9", + "peeking_take_while", + "proc-macro2 0.2.3", + "quote 0.4.2", + "regex", + "which", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -134,8 +183,8 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfd2f4180c5721da6335cc9e9061cce522b87a35e51cc57636d28d22a9863c80" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -152,6 +201,8 @@ dependencies = [ "chrono", "iced", "iced_native", + "lttng-ust", + "lttng-ust-generate", ] [[package]] @@ -160,7 +211,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" dependencies = [ - "log", + "log 0.4.17", "nix 0.24.2", "slotmap", "thiserror", @@ -173,6 +224,21 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +[[package]] +name = "cexpr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" +dependencies = [ + "nom 3.2.1", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -197,7 +263,33 @@ dependencies = [ "num-traits", "time", "wasm-bindgen", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "clang-sys" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e414af9726e1d11660801e73ccc7fb81803fb5f49e5903a25b348b2b3b480d2e" +dependencies = [ + "glob", + "libc", + "libloading 0.4.3", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim 0.8.0", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] @@ -208,7 +300,7 @@ checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" dependencies = [ "error-code", "str-buf", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -356,7 +448,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -365,7 +457,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -375,7 +467,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] @@ -387,7 +479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" dependencies = [ "autocfg", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "memoffset", "once_cell", @@ -400,7 +492,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] @@ -419,12 +511,12 @@ dependencies = [ "foreign-types 0.5.0", "freetype-rs", "libc", - "log", + "log 0.4.17", "objc", "once_cell", "pkg-config", "servo-fontconfig", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -440,8 +532,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" dependencies = [ "bitflags", - "libloading", - "winapi", + "libloading 0.7.3", + "winapi 0.3.9", ] [[package]] @@ -462,9 +554,9 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2", - "quote", - "strsim", + "proc-macro2 1.0.42", + "quote 1.0.20", + "strsim 0.10.0", "syn", ] @@ -475,7 +567,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote", + "quote 1.0.20", "syn", ] @@ -491,7 +583,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" dependencies = [ - "libloading", + "libloading 0.7.3", ] [[package]] @@ -510,7 +602,7 @@ dependencies = [ "libc", "serde", "serde_derive", - "winapi", + "winapi 0.3.9", "wio", ] @@ -547,11 +639,21 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2f4de457d974f548d2c2a16f709ebd81013579e543bd1a9b19ced88132c2cf" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] +[[package]] +name = "env_logger" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" +dependencies = [ + "log 0.3.9", + "regex", +] + [[package]] name = "error-code" version = "2.3.1" @@ -631,8 +733,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -725,8 +827,8 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -754,7 +856,7 @@ dependencies = [ "futures-macro", "futures-sink", "futures-task", - "memchr", + "memchr 2.5.0", "pin-project-lite", "pin-utils", "slab", @@ -776,7 +878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -785,7 +887,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -796,6 +898,12 @@ version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" +[[package]] +name = "glob" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" + [[package]] name = "glow" version = "0.11.2" @@ -816,7 +924,7 @@ checksum = "a69c65dd1f1fbb6209aa00f78636e436ad0a55b7d8e5de886d00720dcad9c6e2" dependencies = [ "glyph_brush_draw_cache", "glyph_brush_layout", - "log", + "log 0.4.17", "ordered-float", "rustc-hash", "twox-hash", @@ -936,7 +1044,7 @@ dependencies = [ "core-foundation-sys", "js-sys", "wasm-bindgen", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -966,7 +1074,7 @@ name = "iced_futures" version = "0.5.1" dependencies = [ "futures", - "log", + "log 0.4.17", "wasm-bindgen-futures", "wasm-timer", ] @@ -980,7 +1088,7 @@ dependencies = [ "glam", "iced_native", "iced_style", - "log", + "log 0.4.17", "raw-window-handle 0.5.0", "thiserror", ] @@ -1019,7 +1127,7 @@ dependencies = [ "guillotiere", "iced_graphics", "iced_native", - "log", + "log 0.4.17", "raw-window-handle 0.5.0", "wgpu", "wgpu_glyph", @@ -1032,10 +1140,10 @@ dependencies = [ "iced_futures", "iced_graphics", "iced_native", - "log", + "log 0.4.17", "thiserror", "web-sys", - "winapi", + "winapi 0.3.9", "window_clipboard", "winit", ] @@ -1062,7 +1170,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -1083,6 +1191,16 @@ dependencies = [ "wasm-bindgen", ] +[[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-egl" version = "4.1.0" @@ -1090,7 +1208,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", - "libloading", + "libloading 0.7.3", "pkg-config", ] @@ -1106,14 +1224,25 @@ version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +[[package]] +name = "libloading" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd38073de8f7965d0c17d30546d4bb6da311ab428d1c7a3fc71dff7f9d4979b9" +dependencies = [ + "kernel32-sys", + "lazy_static", + "winapi 0.2.8", +] + [[package]] name = "libloading" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ - "cfg-if", - "winapi", + "cfg-if 1.0.0", + "winapi 0.3.9", ] [[package]] @@ -1132,13 +1261,38 @@ dependencies = [ "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" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "lttng-ust" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d029a0683065983856ffcc8818fc59d71a48acd4616b3668c69f1ee8026a593" + +[[package]] +name = "lttng-ust-generate" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0210fff1da0b5233f88c1498ad26e7a31ebe28b5e9dc39908d636f5cd964495" +dependencies = [ + "bindgen", + "cc", ] [[package]] @@ -1150,6 +1304,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memchr" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.5.0" @@ -1184,7 +1347,7 @@ dependencies = [ "block", "core-graphics-types", "foreign-types 0.3.2", - "log", + "log 0.4.17", "objc", ] @@ -1210,7 +1373,7 @@ 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", ] @@ -1226,13 +1389,13 @@ dependencies = [ "codespan-reporting", "hexf-parse", "indexmap", - "log", + "log 0.4.17", "num-traits", "rustc-hash", "spirv", "termcolor", "thiserror", - "unicode-xid", + "unicode-xid 0.2.3", ] [[package]] @@ -1262,7 +1425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ "libc", - "log", + "log 0.4.17", "ndk", "ndk-context", "ndk-macro", @@ -1279,8 +1442,8 @@ checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" dependencies = [ "darling", "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -1301,7 +1464,7 @@ checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ "bitflags", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset", ] @@ -1313,18 +1476,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset", ] +[[package]] +name = "nom" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" +dependencies = [ + "memchr 1.0.2", +] + [[package]] name = "nom" version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ - "memchr", + "memchr 2.5.0", "minimal-lexical", ] @@ -1373,8 +1545,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -1460,8 +1632,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05eedf46a8e7c27f74af0c9cfcdb004ceca158cb1b918c6f68f8d7a549b3e427" dependencies = [ "find-crate", - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -1492,12 +1664,12 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1506,13 +1678,19 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", "windows-sys", ] +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1547,8 +1725,8 @@ checksum = "cd94351ac44e70e56b59883e15029a5135f902a8a3020f9c18d580a420e526aa" dependencies = [ "phf_generator", "phf_shared", - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -1607,6 +1785,15 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" +dependencies = [ + "unicode-xid 0.1.0", +] + [[package]] name = "proc-macro2" version = "1.0.42" @@ -1622,13 +1809,22 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f61dcf0b917cd75d4521d7343d1ffff3d1583054133c9b5cbea3375c703c40d" +[[package]] +name = "quote" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" +dependencies = [ + "proc-macro2 0.2.3", +] + [[package]] name = "quote" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.42", ] [[package]] @@ -1728,6 +1924,28 @@ dependencies = [ "bitflags", ] +[[package]] +name = "regex" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +dependencies = [ + "aho-corasick", + "memchr 2.5.0", + "regex-syntax", + "thread_local", + "utf8-ranges", +] + +[[package]] +name = "regex-syntax" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +dependencies = [ + "ucd-util", +] + [[package]] name = "renderdoc-sys" version = "0.7.1" @@ -1768,7 +1986,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04b7c47a572f73de28bee5b5060d085b42b6ce1e4ee2b49c956ea7b25e94b6f0" dependencies = [ "crossfont", - "log", + "log 0.4.17", "smithay-client-toolkit", "tiny-skia", ] @@ -1785,8 +2003,8 @@ version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] @@ -1851,7 +2069,7 @@ dependencies = [ "calloop", "dlib", "lazy_static", - "log", + "log 0.4.17", "memmap2", "nix 0.24.2", "pkg-config", @@ -1892,6 +2110,12 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + [[package]] name = "strsim" version = "0.10.0" @@ -1910,8 +2134,8 @@ version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "unicode-ident", ] @@ -1924,6 +2148,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + [[package]] name = "thiserror" version = "1.0.31" @@ -1939,11 +2172,20 @@ version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", ] +[[package]] +name = "thread_local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +dependencies = [ + "lazy_static", +] + [[package]] name = "time" version = "0.1.44" @@ -1952,7 +2194,7 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1964,7 +2206,7 @@ dependencies = [ "arrayref", "arrayvec 0.5.2", "bytemuck", - "cfg-if", + "cfg-if 1.0.0", "png", "safe_arch", "tiny-skia-path", @@ -2001,11 +2243,17 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "rand", "static_assertions", ] +[[package]] +name = "ucd-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abd2fc5d32b590614af8b0a20d837f32eca055edd0bbead59a9cfe80858be003" + [[package]] name = "unicode-ident" version = "1.0.2" @@ -2024,12 +2272,24 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +[[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.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +[[package]] +name = "utf8-ranges" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" + [[package]] name = "vec_map" version = "0.8.2" @@ -2060,7 +2320,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -2071,10 +2331,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "log", + "log 0.4.17", "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", "wasm-bindgen-shared", ] @@ -2085,7 +2345,7 @@ version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -2097,7 +2357,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ - "quote", + "quote 1.0.20", "wasm-bindgen-macro-support", ] @@ -2107,8 +2367,8 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -2192,8 +2452,8 @@ version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.42", + "quote 1.0.20", "xml-rs", ] @@ -2226,7 +2486,7 @@ checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" dependencies = [ "arrayvec 0.7.2", "js-sys", - "log", + "log 0.4.17", "naga", "parking_lot 0.12.1", "raw-window-handle 0.5.0", @@ -2252,7 +2512,7 @@ dependencies = [ "cfg_aliases", "codespan-reporting", "fxhash", - "log", + "log 0.4.17", "naga", "parking_lot 0.12.1", "profiling", @@ -2285,8 +2545,8 @@ dependencies = [ "gpu-descriptor", "js-sys", "khronos-egl", - "libloading", - "log", + "libloading 0.7.3", + "log 0.4.17", "metal", "naga", "objc", @@ -2300,7 +2560,7 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2320,10 +2580,25 @@ checksum = "0cafb82773e0f124a33674dab5de4dff73175aeb921949047ab014efb58fb446" dependencies = [ "bytemuck", "glyph_brush", - "log", + "log 0.4.17", "wgpu", ] +[[package]] +name = "which" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" +dependencies = [ + "libc", +] + +[[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" @@ -2334,6 +2609,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[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" @@ -2346,7 +2627,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2355,7 +2636,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2433,7 +2714,7 @@ dependencies = [ "dispatch", "instant", "libc", - "log", + "log 0.4.17", "mio", "ndk", "ndk-glue", @@ -2459,7 +2740,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2481,7 +2762,7 @@ checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" dependencies = [ "gethostname", "nix 0.22.3", - "winapi", + "winapi 0.3.9", "winapi-wsapoll", ] @@ -2491,7 +2772,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" dependencies = [ - "nom", + "nom 7.1.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a591e12..5f78df9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,11 +3,16 @@ name = "calendar" version = "0.1.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +tracing = ["dep:lttng-ust"] [dependencies] #iced = "0.4.2" #iced_native = "0.5.1" iced = { path = "../iced" } iced_native = { path = "../iced/native" } -chrono = "0.4" \ No newline at end of file +chrono = "0.4" +lttng-ust = { version = "0.1.0", optional = true } + +[build-dependencies] +lttng-ust-generate = "0.1.0" \ No newline at end of file diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..bba0d98 --- /dev/null +++ b/build.rs @@ -0,0 +1,25 @@ +use std::env; +use std::path::PathBuf; + +use lttng_ust_generate::{Provider, Generator, CTFType, CIntegerType}; + +fn main() { + // the provider is called calendar + let mut provider = Provider::new("calendar"); + + // class for drawing events + let draw_class = provider.create_class("draw") + .add_field("width", CTFType::Integer(CIntegerType::I32)) + .add_field("height", CTFType::Integer(CIntegerType::I32)); + + // drawing events + draw_class.instantiate("draw_entry"); + draw_class.instantiate("draw_exit"); + + Generator::default() + .generated_lib_name("calendar_tracepoints") + .register_provider(provider) + .output_file_name(PathBuf::from(env::var("OUT_DIR").unwrap()).join("tracepoints.rs")) + .generate() + .expect("Unable to generate tracepoint bindings"); +} \ No newline at end of file diff --git a/src/ui/calendar.rs b/src/ui/calendar.rs index 6b4e142..60a53a9 100644 --- a/src/ui/calendar.rs +++ b/src/ui/calendar.rs @@ -16,7 +16,19 @@ use iced_native::alignment; use iced_native::widget::Tree; use chrono::{NaiveDate, Datelike, Duration, Local}; use super::basics::CellGrid; -use crate::model::events::{Event, EventsCollection}; +use crate::model::events::EventsCollection; + +#[cfg(feature = "tracing")] +extern crate lttng_ust; + +#[cfg(feature = "tracing")] +use lttng_ust::import_tracepoints; + +#[cfg(feature = "tracing")] +import_tracepoints!( + concat!(env!("OUT_DIR"), "/tracepoints.rs"), + tracepoints +); const MONTH_NAMES: [&str;12] = [ "gen", @@ -543,8 +555,6 @@ impl<'a> CalendarYearView<'a> { self.params.day_today_bg } else if weekday > 4 { self.params.day_weekend_bg - } else if self.events.is_any_in_day(current_day) { - self.params.ev_bg } else { Color::TRANSPARENT }; @@ -571,6 +581,25 @@ impl<'a> CalendarYearView<'a> { horizontal_alignment: alignment::Horizontal::Left, vertical_alignment: alignment::Vertical::Top, }); + // render events, if enough space + + let day_text_size = renderer.measure(content, font_size as u16, Default::default(), day_bounds.size()); + let ev_height: f32 = 12.0; + if day_bounds.height - day_text_size.1 > ev_height { + if self.events.is_any_in_day(current_day) { + renderer.fill_quad(renderer::Quad { + bounds: Rectangle { + y: y + day_text_size.1, + height: ev_height, + ..day_bounds + }, + border_radius: 0.0.into(), + border_width: 1.0, + border_color: self.params.day_other_month_fg, + }, + self.params.ev_bg); + } + } } } } @@ -620,6 +649,8 @@ where ) { let bounds = layout.bounds(); let margin: f32 = 20.0; + #[cfg(feature = "tracing")] + tracepoints::calendar::draw_entry(bounds.width as i32, bounds.height as i32); // week column only visible if there is enough space let month_w = if self.params.show_weeks { @@ -651,6 +682,8 @@ where let width = bounds.width - month_w; let height = bounds.height - first_row_h; self.draw_days(renderer, Rectangle{x, y, width, height}); + #[cfg(feature = "tracing")] + tracepoints::calendar::draw_exit(bounds.width as i32, bounds.height as i32); } }