diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000..c4676887 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,100 @@ +name: Rust + +on: + pull_request: {} + push: + branches: + - master + +jobs: + + build: + strategy: + fail-fast: false + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Fetch tags + run: git fetch --tags + - name: Setup system dependencies + run: sudo apt-get install libgtk-3-dev libxcb-shape0-dev libxcb-xfixes0-dev + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: clippy + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: build-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: build-cargo-index-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: build-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - name: Run cargo build + run: | + cargo build --locked + - name: Run cargo test + run: | + cargo test --locked + + rustfmt: + strategy: + fail-fast: false + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt + - name: Run rustfmt + run: | + git ls-files '*.rs' | xargs rustfmt --check + + cargo_bloat: + if: false + strategy: + fail-fast: false + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: bloat-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: bloat-cargo-index-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: bloat-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - name: Run cargo bloat + uses: orf/cargo-bloat-action@v1 + with: + token: ${{ github.token }} diff --git a/.gitignore b/.gitignore index 46f38471..e9868bd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /target -Cargo.lock *.swp diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..9551a2c1 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2002 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "Qglif" +version = "0.1.0" +dependencies = [ + "backtrace", + "clap", + "clipboard", + "colored", + "derive_more", + "enum-iterator", + "env_logger", + "font-kit", + "git-version", + "glifparser", + "imgui-winit-support", + "lazy_static", + "log", + "mfeq-ipc", + "nfd", + "regex", + "skulpin", + "skulpin-plugin-imgui", + "winapi 0.3.9", +] + +[[package]] +name = "addr2line" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" + +[[package]] +name = "aho-corasick" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" +dependencies = [ + "memchr", +] + +[[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_log-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" + +[[package]] +name = "ash" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c69a8137596e84c22d57f3da1b5de1d4230b1742a710091c85f4d7ce50f00f38" +dependencies = [ + "libloading", +] + +[[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]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "bindgen" +version = "0.55.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b13ce559e6433d360c26305643803cb52cfbabbc2b9c47ce04a58493dfb443" +dependencies = [ + "bitflags", + "cexpr", + "cfg-if", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2 1.0.21", + "quote 1.0.7", + "regex", + "rustc-hash", + "shlex", + "which", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "calloop" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160" +dependencies = [ + "mio", + "mio-extras", + "nix", +] + +[[package]] +name = "cc" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c" + +[[package]] +name = "cexpr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "clang-sys" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da1484c6a890e374ca5086062d4847e0a2c1e5eba9afa5d48c09e8eb39b2519" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clipboard" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a904646c0340239dcf7c51677b33928bf24fdf424b79a57909c0109075b2e7" +dependencies = [ + "clipboard-win", + "objc", + "objc-foundation", + "objc_id", + "x11-clipboard", +] + +[[package]] +name = "clipboard-win" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a093d6fed558e5fe24c3dfc85a68bb68f1c824f440d3ba5aca189e2998786b" +dependencies = [ + "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]] +name = "cmake" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb" +dependencies = [ + "cc", +] + +[[package]] +name = "cocoa" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c49e86fc36d5704151f5996b7b3795385f50ce09e3be0f47a0cfde869681cf8" +dependencies = [ + "bitflags", + "block", + "core-foundation 0.7.0", + "core-graphics 0.19.2", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +dependencies = [ + "atty", + "lazy_static", + "winapi 0.3.9", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +dependencies = [ + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys 0.8.1", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" + +[[package]] +name = "core-foundation-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0af3b5e4601de3837c9332e29e0aae47a0d46ebfa246d12b82f564bac233393" + +[[package]] +name = "core-graphics" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +dependencies = [ + "bitflags", + "core-foundation 0.7.0", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc239bba52bab96649441699533a68de294a101533b0270b2d65aa402b29a7f9" +dependencies = [ + "bitflags", + "core-foundation 0.9.1", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +dependencies = [ + "bitflags", + "core-foundation 0.9.1", + "foreign-types", + "libc", +] + +[[package]] +name = "core-text" +version = "19.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c7f46e8b820fd5f4b28528104b28b0a91cbe9e9c5bde8017087fb44bc93a60" +dependencies = [ + "core-foundation 0.9.1", + "core-graphics 0.22.1", + "foreign-types", + "libc", +] + +[[package]] +name = "core-video-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" +dependencies = [ + "cfg-if", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", + "libc", + "objc", +] + +[[package]] +name = "crc32fast" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg", + "cfg-if", + "lazy_static", +] + +[[package]] +name = "curl" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78baca05127a115136a9898e266988fc49ca7ea2c839f60fc6e1fc9df1599168" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi 0.3.9", +] + +[[package]] +name = "curl-sys" +version = "0.4.36+curl-7.71.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68cad94adeb0c16558429c3c34a607acc9ea58e09a7b66310aabc9788fc5d721" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi 0.3.9", +] + +[[package]] +name = "derivative" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +dependencies = [ + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn", +] + +[[package]] +name = "derive_more" +version = "0.99.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dcfabdab475c16a93d669dddfc393027803e347d09663f524447f642fbb84ba" +dependencies = [ + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn", +] + +[[package]] +name = "dirs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" +dependencies = [ + "cfg-if", + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" +dependencies = [ + "libloading", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "winapi 0.3.9", + "wio", +] + +[[package]] +name = "enum-iterator" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c79a6321a1197d7730510c7e3f6cb80432dfefecb32426de8cea0aa19b4bb8d7" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e94aa31f7c0dc764f57896dc615ddd76fc13b0d5dca7eb6cc5e018a5a09ec06" +dependencies = [ + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "expat-sys" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" +dependencies = [ + "cmake", + "pkg-config", +] + +[[package]] +name = "filetime" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", +] + +[[package]] +name = "flate2" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" +dependencies = [ + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", +] + +[[package]] +name = "float-ord" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" + +[[package]] +name = "font-kit" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f9042cb45150fb2b2a012fc03d0f1d2071f18e90397b9d2a5ec8ade8464bf20" +dependencies = [ + "bitflags", + "byteorder", + "core-foundation 0.9.1", + "core-graphics 0.22.1", + "core-text", + "dirs", + "dwrote", + "float-ord", + "freetype", + "lazy_static", + "libc", + "log", + "pathfinder_geometry", + "pathfinder_simd", + "servo-fontconfig", + "walkdir", + "winapi 0.3.9", +] + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "freetype" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6" +dependencies = [ + "freetype-sys", + "libc", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", +] + +[[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 = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] +name = "getrandom" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" + +[[package]] +name = "git-version" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94918e83f1e01dedc2e361d00ce9487b14c58c7f40bab148026fa39d42cb41e2" +dependencies = [ + "git-version-macro", + "proc-macro-hack", +] + +[[package]] +name = "git-version-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34a97a52fdee1870a34fa6e4b77570cba531b27d1838874fef4429a791a3d657" +dependencies = [ + "proc-macro-hack", + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn", +] + +[[package]] +name = "glifparser" +version = "0.0.0" +source = "git+https://github.com/mfeq/glifparser#5f5f1d760cd7074e6be8a335b96cb2bf1a3188b9" +dependencies = [ + "log", + "xmltree", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +dependencies = [ + "libc", +] + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "imgui" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fdb2bcc7e498e78137ce28705ae836d69e36ee2eac89d0d926cfabfcf550570" +dependencies = [ + "bitflags", + "imgui-sys", + "lazy_static", + "parking_lot", +] + +[[package]] +name = "imgui-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72be9671d64dd0ed26bb708cd10060a431262ac90ae70cf7c5912feefe6849da" +dependencies = [ + "cc", +] + +[[package]] +name = "imgui-winit-support" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98171c35263e3eb0dfb66cb876e3efdb788d777c1b613c7d2592303d1276bb5" +dependencies = [ + "imgui", + "winit", +] + +[[package]] +name = "instant" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485" + +[[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 = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[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 = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235" + +[[package]] +name = "libloading" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2443d8f0478b16759158b2f66d525991a05491138bc05814ef52a250148ef4f9" +dependencies = [ + "cfg-if", + "winapi 0.3.9", +] + +[[package]] +name = "libz-sys" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "line_drawing" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" +dependencies = [ + "num-traits", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +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.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[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 = "metal" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e198a0ee42bdbe9ef2c09d0b9426f3b2b47d90d93a4a9b0395c4cea605e92dc0" +dependencies = [ + "bitflags", + "block", + "cocoa", + "core-graphics 0.19.2", + "foreign-types", + "log", + "objc", +] + +[[package]] +name = "mfeq-ipc" +version = "0.0.0" +source = "git+https://github.com/mfeq/ipc#f07ea86d152c052b9d532e9a896fb7db6025e1ed" +dependencies = [ + "log", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "mio" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +dependencies = [ + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio", + "slab", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "ndk" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" +dependencies = [ + "jni-sys", + "ndk-sys", + "num_enum", +] + +[[package]] +name = "ndk-glue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" +dependencies = [ + "android_log-sys", + "lazy_static", + "libc", + "log", + "ndk", + "ndk-sys", +] + +[[package]] +name = "ndk-sys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" + +[[package]] +name = "net2" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" +dependencies = [ + "cfg-if", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "nfd" +version = "0.0.4" +source = "git+https://github.com/raphlinus/nfd-rs?rev=5e09b79bf511e3a91ae8cefdb96e9734fa4a79c2#5e09b79bf511e3a91ae8cefdb96e9734fa4a79c2" +dependencies = [ + "gcc", +] + +[[package]] +name = "nix" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "void", +] + +[[package]] +name = "nom" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "memchr", + "version_check", +] + +[[package]] +name = "num-traits" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.21", + "quote 1.0.7", + "syn", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", + "objc_exception", +] + +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + +[[package]] +name = "object" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" + +[[package]] +name = "openssl-sys" +version = "0.9.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ordered-float" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3741934be594d77de1c8461ebcbbe866f585ea616a9753aa78f2bdc69f0e4579" +dependencies = [ + "num-traits", +] + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", +] + +[[package]] +name = "pathfinder_geometry" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" +dependencies = [ + "log", + "pathfinder_simd", +] + +[[package]] +name = "pathfinder_simd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b451513912d6b3440e443aa75a73ab22203afedc4a90df8526d008c0f86f7cb3" +dependencies = [ + "rustc_version", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pkg-config" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" + +[[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.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c" +dependencies = [ + "unicode-xid 0.2.1", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2 1.0.21", +] + +[[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 = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_users" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +dependencies = [ + "getrandom", + "redox_syscall", + "rust-argon2", +] + +[[package]] +name = "regex" +version = "1.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" + +[[package]] +name = "rust-argon2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" +dependencies = [ + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" + +[[package]] +name = "rustc-hash" +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 = "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 = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +dependencies = [ + "lazy_static", + "winapi 0.3.9", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[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.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" + +[[package]] +name = "serde_json" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "servo-fontconfig" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" +dependencies = [ + "libc", + "servo-fontconfig-sys", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" +dependencies = [ + "expat-sys", + "freetype-sys", + "pkg-config", +] + +[[package]] +name = "shlex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" + +[[package]] +name = "skia-bindings" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c5185b034cf64abcb41b864d7049de55e43f842f15e5e682ee4888b32366cb" +dependencies = [ + "bindgen", + "cc", + "curl", + "flate2", + "heck", + "regex", + "serde_json", + "tar", + "toml", +] + +[[package]] +name = "skia-safe" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa82b761a1f1184826f28596fbd4710581c315926fc73749cef9337a3537d085" +dependencies = [ + "bitflags", + "lazy_static", + "skia-bindings", +] + +[[package]] +name = "skulpin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a6736061ddaad5e4bd8117fec211cbee2a4d55cd3e9cc2b2f829074ee03624" +dependencies = [ + "log", + "skulpin-app-winit", + "skulpin-renderer", + "skulpin-renderer-winit", +] + +[[package]] +name = "skulpin-app-winit" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8af93815075a9a3aa9f278ba5c5d53e81d86bb803ea360bbee3d614d991c8da0" +dependencies = [ + "log", + "skulpin-renderer", + "skulpin-renderer-winit", +] + +[[package]] +name = "skulpin-plugin-imgui" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a7a17b24c7b8a5298ab1d76499ab32c900f899ee6fb0ed107ab6e6c7d4dbfb" +dependencies = [ + "imgui", + "log", + "skulpin-renderer", +] + +[[package]] +name = "skulpin-renderer" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0372554bf77c6742c271589fbd0f63646de5e35c0604bfc8b5a85f5cb14375ca" +dependencies = [ + "ash", + "log", + "skia-bindings", + "skia-safe", +] + +[[package]] +name = "skulpin-renderer-winit" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dee4e5af396d7e8db2fed3d291626bd9053a69330fdd9f7e61530ee92c778e7" +dependencies = [ + "cocoa", + "log", + "metal", + "objc", + "raw-window-handle", + "skulpin-renderer", + "winapi 0.3.9", + "winit", +] + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "smallvec" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" + +[[package]] +name = "smithay-client-toolkit" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "421c8dc7acf5cb205b88160f8b4cc2c5cfabe210e43b2f80f009f4c1ef910f1d" +dependencies = [ + "andrew", + "bitflags", + "dlib", + "lazy_static", + "memmap", + "nix", + "wayland-client", + "wayland-protocols", +] + +[[package]] +name = "socket2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", +] + +[[package]] +name = "stb_truetype" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" +dependencies = [ + "byteorder", +] + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "syn" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b" +dependencies = [ + "proc-macro2 1.0.21", + "quote 1.0.7", + "unicode-xid 0.2.1", +] + +[[package]] +name = "tar" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" +dependencies = [ + "filetime", + "libc", + "redox_syscall", + "xattr", +] + +[[package]] +name = "termcolor" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +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 = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +dependencies = [ + "serde", +] + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" + +[[package]] +name = "unicode-width" +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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "vcpkg" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wayland-client" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" +dependencies = [ + "bitflags", + "calloop", + "downcast-rs", + "libc", + "mio", + "nix", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" +dependencies = [ + "nix", + "wayland-sys", +] + +[[package]] +name = "wayland-protocols" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" +dependencies = [ + "bitflags", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" +dependencies = [ + "dlib", + "lazy_static", +] + +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winit" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4ccbf7ddb6627828eace16cacde80fc6bf4dbb3469f88487262a02cf8e7862" +dependencies = [ + "bitflags", + "cocoa", + "core-foundation 0.7.0", + "core-graphics 0.19.2", + "core-video-sys", + "dispatch", + "instant", + "lazy_static", + "libc", + "log", + "mio", + "mio-extras", + "ndk", + "ndk-glue", + "ndk-sys", + "objc", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "smithay-client-toolkit", + "wayland-client", + "winapi 0.3.9", + "x11-dl", +] + +[[package]] +name = "wio" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" +dependencies = [ + "winapi 0.3.9", +] + +[[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-clipboard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89bd49c06c9eb5d98e6ba6536cf64ac9f7ee3a009b2f53996d405b3944f6bcea" +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 = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +dependencies = [ + "libc", +] + +[[package]] +name = "xcb" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" +dependencies = [ + "libc", + "log", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" + +[[package]] +name = "xmltree" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76badaccb0313f1f0cb6582c2973f2dd0620f9652eb7a5ff6ced0cc3ac922b3" +dependencies = [ + "xml-rs", +] diff --git a/Cargo.toml b/Cargo.toml index 9015cd46..72e83f70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "Qglif" version = "0.1.0" authors = ["Fredrick Brennan "] +edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/events/console/commands.rs b/src/events/console/commands.rs index 62080fef..7e7263e5 100644 --- a/src/events/console/commands.rs +++ b/src/events/console/commands.rs @@ -2,7 +2,7 @@ use crate::events; use std::collections::HashMap; -type Callback = Box<(Fn(Vec) -> () + 'static)>; +type Callback = Box<(dyn Fn(Vec) -> () + 'static)>; fn callback(f: F) -> Callback where diff --git a/src/events/console/mod.rs b/src/events/console/mod.rs index 01e2e237..81bf41cd 100644 --- a/src/events/console/mod.rs +++ b/src/events/console/mod.rs @@ -5,7 +5,7 @@ use clipboard::{ClipboardContext, ClipboardProvider}; mod commands; -use winit::event::{ModifiersState, VirtualKeyCode}; +use crate::winit::event::{ModifiersState, VirtualKeyCode}; // Only called if ElementState::Pressed pub fn set_state(vk: VirtualKeyCode, m: ModifiersState) { CONSOLE.with(|c| match vk { @@ -30,7 +30,7 @@ pub fn set_state(vk: VirtualKeyCode, m: ModifiersState) { const CHAR_BACKSPACE: char = '\x08'; -use state::RendererConsole; +use crate::state::RendererConsole; impl RendererConsole { ///! Handle chars which will not trigger events (so, not :, Escape or Return) pub fn handle_ch(&mut self, ch: char) { @@ -55,7 +55,7 @@ impl RendererConsole { } } -use regex::{self, Regex}; +use regex::Regex; pub fn run_command(c: &mut RendererConsole) { lazy_static! { static ref COMMAND_RE: Regex = Regex::new(r"\s+").unwrap(); diff --git a/src/events/pen.rs b/src/events/pen.rs index 3eb40483..4e1eb62f 100644 --- a/src/events/pen.rs +++ b/src/events/pen.rs @@ -39,9 +39,9 @@ pub fn mouse_moved( } pub fn mouse_pressed( - position: PhysicalPosition, + _position: PhysicalPosition, v: &RefCell>>, - meta: MouseMeta, + _meta: MouseMeta, ) -> bool { let mposition = v.borrow().mousepos; @@ -69,11 +69,11 @@ pub fn mouse_pressed( } pub fn mouse_released( - position: PhysicalPosition, + _position: PhysicalPosition, v: &RefCell>>, - meta: MouseMeta, + _meta: MouseMeta, ) -> bool { - let mposition = v.borrow().mousepos; + let _mposition = v.borrow().mousepos; TOOL_DATA.with(|vv| { //vv.borrow_mut().contour = None; diff --git a/src/events/prelude.rs b/src/events/prelude.rs index f3c4a845..d6f0af1f 100644 --- a/src/events/prelude.rs +++ b/src/events/prelude.rs @@ -5,9 +5,9 @@ pub use super::{center_cursor, mode_switched, update_mousepos, update_viewport}; pub use crate::renderer::constants::*; pub use crate::renderer::points::calc::*; pub use crate::state; +pub use crate::state::{Mode, PointData, ToolData}; pub use crate::util; pub use crate::{CONSOLE, STATE, TOOL_DATA}; -pub use state::{Mode, PointData, ToolData}; // Skia/Winit stuff pub use skulpin::skia_safe::Contains as _; diff --git a/src/events/select.rs b/src/events/select.rs index 2a4864dc..07ec8435 100644 --- a/src/events/select.rs +++ b/src/events/select.rs @@ -110,9 +110,9 @@ pub fn mouse_moved(position: PhysicalPosition, v: &RefCell( - position: PhysicalPosition, - v: &RefCell>, - meta: MouseMeta, + _position: PhysicalPosition, + _v: &RefCell>, + _meta: MouseMeta, ) -> bool { false } @@ -125,8 +125,8 @@ fn clicked_point_or_handle( ) -> Option<(usize, usize, WhichHandle)> { let factor = v.borrow().factor; let mposition = update_mousepos(position, &v, true); - let mut contour_idx = 0; - let mut point_idx = 0; + let _contour_idx = 0; + let _point_idx = 0; // How we do this is quite naïve. For each click, we just iterate all points and check the // point and both handles. It's just a bunch of floating point comparisons in a compiled @@ -207,9 +207,9 @@ pub fn mouse_pressed( } pub fn mouse_released( - position: PhysicalPosition, + _position: PhysicalPosition, v: &RefCell>, - meta: MouseMeta, + _meta: MouseMeta, ) -> bool { v.borrow_mut().show_sel_box = false; true diff --git a/src/events/zoom.rs b/src/events/zoom.rs index 9eefc8aa..7da09c29 100644 --- a/src/events/zoom.rs +++ b/src/events/zoom.rs @@ -1,11 +1,11 @@ // Zoom use super::prelude::*; -pub fn zoom_in_factor(factor: f32, v: &RefCell>) -> f32 { +pub fn zoom_in_factor(_factor: f32, v: &RefCell>) -> f32 { v.borrow().factor + SCALE_FACTOR } -pub fn zoom_out_factor(factor: f32, v: &RefCell>) -> f32 { +pub fn zoom_out_factor(_factor: f32, v: &RefCell>) -> f32 { let mut scale = v.borrow().factor; if scale >= 0.10 { scale += -SCALE_FACTOR; @@ -14,12 +14,12 @@ pub fn zoom_out_factor(factor: f32, v: &RefCell>) -> f32 { } pub fn mouse_moved(position: PhysicalPosition, v: &RefCell>) -> bool { - let mposition = update_mousepos(position, &v, false); + let _mposition = update_mousepos(position, &v, false); false } pub fn mouse_released( - position: PhysicalPosition, + _position: PhysicalPosition, v: &RefCell>, meta: MouseMeta, ) -> bool { @@ -36,7 +36,7 @@ pub fn mouse_released( let mut offset = v.borrow().offset; let winsize = v.borrow().winsize; let position = v.borrow().absolute_mousepos; - let mut center = ( + let center = ( (winsize.width as f32 / 2.) + offset.0, (winsize.height as f32 / 2.) + offset.1, ); diff --git a/src/imgui/mod.rs b/src/imgui/mod.rs index 75332dce..760a384f 100644 --- a/src/imgui/mod.rs +++ b/src/imgui/mod.rs @@ -1,8 +1,5 @@ use skulpin_plugin_imgui::imgui; -use std::time::Instant; -use std::{rc::Rc, sync::Arc}; - use crate::events; use crate::state::Mode; use crate::STATE; @@ -36,7 +33,7 @@ pub fn build_and_check_button(ui: &imgui::Ui, mode: Mode, icon: &[u8]) { }); } -pub fn build_imgui_ui(mut ui: &mut imgui::Ui) { +pub fn build_imgui_ui(ui: &mut imgui::Ui) { STATE.with(|v| { let mode = v.borrow().mode; diff --git a/src/imgui/support.rs b/src/imgui/support.rs index 60601dd2..e9a9699f 100644 --- a/src/imgui/support.rs +++ b/src/imgui/support.rs @@ -2,17 +2,17 @@ // https://github.com/aclysma/skulpin/blob/24cff6ff1d1b6dadc8a9d8ae04a6065a9294f906/examples/imgui_support/mod.rs // License is MIT: https://github.com/aclysma/skulpin/blob/78ce6228851168fa53d95a1fdddfb2ea39168140/LICENSE-MIT -use imgui_rs; +use crate::imgui_rs; +use crate::system_fonts; use imgui_winit_support; -use system_fonts; -use imgui_rs::sys as imgui_sys; +use crate::imgui_rs::sys as imgui_sys; use skulpin::winit; use std::sync::Arc; use std::sync::Mutex; -use imgui_rs::internal::RawCast as _; +use crate::imgui_rs::internal::RawCast as _; // Inner state for ImguiManager, which will be protected by a Mutex. Mutex protection required since // this object is Send but not Sync @@ -267,7 +267,7 @@ impl ImguiManager { } fn init_imgui(window: &winit::window::Window) -> imgui_rs::Context { - use imgui_rs::Context; + use crate::imgui_rs::Context; let mut imgui = Context::create(); { diff --git a/src/io.rs b/src/io.rs index 646ab964..ce1f630b 100644 --- a/src/io.rs +++ b/src/io.rs @@ -1,5 +1,5 @@ use crate::state::Glyph; -use crate::util::DEBUG; + use crate::STATE; use std::env; use std::fs; diff --git a/src/main.rs b/src/main.rs index 79d92891..3e2c104f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,13 +35,13 @@ extern crate regex; extern crate glifparser; extern crate mfeq_ipc; +use crate::winit::dpi::LogicalSize; +use crate::winit::event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent}; +use crate::winit::event_loop::{ControlFlow, EventLoop}; use skulpin::Window as _; pub use skulpin::{skia_safe, winit}; -use winit::dpi::{LogicalSize, PhysicalPosition}; -use winit::event::{ElementState, Event, KeyboardInput, MouseButton, VirtualKeyCode, WindowEvent}; -use winit::event_loop::{ControlFlow, EventLoop}; -use skia_safe::{Contains, Point, Rect}; +use crate::skia_safe::{Contains, Point}; use enum_iterator::IntoEnumIterator as _; @@ -53,9 +53,9 @@ pub use skulpin_plugin_imgui::{imgui::Ui as ImguiUi, ImguiRendererPlugin}; // Provides thread-local global variables. pub mod state; -pub use state::Glyph; // types -pub use state::{HandleStyle, PointLabels, PreviewMode}; // enums -pub use state::{CONSOLE, STATE, TOOL_DATA}; // globals +pub use crate::state::Glyph; // types +pub use crate::state::{HandleStyle, PointLabels, PreviewMode}; // enums +pub use crate::state::{CONSOLE, STATE, TOOL_DATA}; // globals mod filedialog; #[macro_use] @@ -68,7 +68,7 @@ mod ipc; mod renderer; mod system_fonts; -use renderer::constants::*; +use crate::renderer::constants::*; fn main() { #[cfg(target_family = "windows")] @@ -84,7 +84,7 @@ fn main() { let window_size = (WIDTH, HEIGHT); let args = util::argparser::parse_args(); let filename = filedialog::filename_or_panic(&args.filename, Some("glif"), None); - let glif = io::load_glif(&filename); + let _glif = io::load_glif(&filename); if mfeq_ipc::module_available("Qmetadata".into()) == mfeq_ipc::Available::Yes { ipc::fetch_metrics(); @@ -132,7 +132,7 @@ fn main() { let mut renderer = renderer.unwrap(); - let mut last_frame = Instant::now(); + let _last_frame = Instant::now(); STATE.with(|v| { v.borrow_mut().dpi = window.scale_factor(); @@ -140,7 +140,7 @@ fn main() { let mut frame_count = 0; let mut frame = 0; - let mut was_resized = false; + let _was_resized = false; event_loop.run(move |event, _, control_flow| { *control_flow = ControlFlow::Wait; @@ -371,7 +371,7 @@ fn main() { _ => (), }, Event::RedrawRequested { .. } => { - if let Err(e) = renderer.draw(&window, |canvas, coordinate_system_helper| { + if let Err(e) = renderer.draw(&window, |canvas, _coordinate_system_helper| { imgui_manager.begin_frame(&winit_window); frame_count += 1; diff --git a/src/renderer/console.rs b/src/renderer/console.rs index 27e91c65..88c6e8f8 100644 --- a/src/renderer/console.rs +++ b/src/renderer/console.rs @@ -27,8 +27,8 @@ impl Console { } use skulpin::skia_safe::{Data, Font, FontStyle, Typeface}; -use std::fs; -use system_fonts; + +use crate::system_fonts; lazy_static! { static ref MONO_FONT_BYTES: Option> = { match system_fonts::SYSTEMMONO.path { @@ -38,7 +38,6 @@ lazy_static! { }; } -use std::cell::RefCell; lazy_static! { static ref CONSOLE_TYPEFACE: Typeface = { match &*MONO_FONT_BYTES { @@ -67,9 +66,9 @@ impl Console { let mut size = (winsize.width as f32, 0.); let (_, trect) = font.measure_str("Q", None); - topleft.1 -= (CONSOLE_PADDING_Y_TOP + CONSOLE_PADDING_Y_BOTTOM); + topleft.1 -= CONSOLE_PADDING_Y_TOP + CONSOLE_PADDING_Y_BOTTOM; topleft.1 -= trect.height(); // premultiplied by font - size.1 += (CONSOLE_PADDING_Y_TOP + CONSOLE_PADDING_Y_BOTTOM); + size.1 += CONSOLE_PADDING_Y_TOP + CONSOLE_PADDING_Y_BOTTOM; size.1 += trect.height(); // premultiplied by font // Draw background @@ -105,5 +104,5 @@ enum Return { struct Command { name: String, args: Vec, - run: Fn() -> Return, + run: dyn Fn() -> Return, } diff --git a/src/renderer/glyph.rs b/src/renderer/glyph.rs index 6e90831c..ab84329e 100644 --- a/src/renderer/glyph.rs +++ b/src/renderer/glyph.rs @@ -1,12 +1,11 @@ use super::constants::*; -use super::points; + use super::points::calc::*; -use crate::state::{PointData, PreviewMode, State}; +use crate::state::{PointData, PreviewMode}; use crate::STATE; -use glifparser::{self, Handle, OutlineType, PointType, WhichHandle}; -use skulpin::skia_safe::path::Iter; -use skulpin::skia_safe::{Canvas, Paint, PaintStyle, Path, Point}; -use std::cell::RefCell; +use glifparser::{self, OutlineType, PointType, WhichHandle}; + +use skulpin::skia_safe::{Canvas, Paint, PaintStyle, Path}; pub fn draw(canvas: &mut Canvas) -> Path { STATE.with(|v| { @@ -36,8 +35,8 @@ pub fn draw(canvas: &mut Canvas) -> Path { path.move_to((calc_x(contour[0].x), calc_y(contour[0].y))); let firstpoint: &glifparser::Point> = contour.first().unwrap(); let mut prevpoint: &glifparser::Point> = contour.first().unwrap(); - let mut pointiter = contour.iter().enumerate(); - for (i, point) in pointiter { + let pointiter = contour.iter().enumerate(); + for (_i, point) in pointiter { match point.ptype { PointType::Line => { path.line_to((calc_x(point.x), calc_y(point.y))); diff --git a/src/renderer/guidelines.rs b/src/renderer/guidelines.rs index 354c9475..63a12354 100644 --- a/src/renderer/guidelines.rs +++ b/src/renderer/guidelines.rs @@ -1,8 +1,7 @@ use super::constants::*; use super::points::calc::*; -use crate::{state, STATE}; +use crate::STATE; use skulpin::skia_safe::{Canvas, Color, Paint, PaintStyle, Path}; -use state::State; pub enum GuidelineType { Horizontal, diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index 6e022375..f6b6edbc 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -1,9 +1,8 @@ //! Skia renderer. -use super::glifparser; use crate::state::PreviewMode; use crate::{CONSOLE, STATE}; -use glifparser::{Handle, PointType, WhichHandle}; +use glifparser::Handle; pub mod constants; use self::constants::*; @@ -13,7 +12,7 @@ mod guidelines; pub use self::guidelines::{Guideline, GuidelineType}; pub mod points; // point drawing functions // This imports calc_x, etc. which transforms coordinates between .glif and Skia -use self::points::calc::*; + mod glyph; mod selbox; mod viewport; @@ -23,10 +22,6 @@ use skulpin::skia_safe::{ TileMode, }; -use skulpin::winit::dpi::PhysicalPosition; -use std::cell::RefCell; -use std::cmp::min; - #[derive(Clone, Copy, PartialEq)] pub enum UIPointType { Point((Handle, Handle)), diff --git a/src/renderer/points/calc.rs b/src/renderer/points/calc.rs index 64885a5b..80559cd9 100644 --- a/src/renderer/points/calc.rs +++ b/src/renderer/points/calc.rs @@ -1,5 +1,3 @@ -use crate::STATE; - pub fn calc_x(x: f32) -> f32 { x } diff --git a/src/renderer/points/mod.rs b/src/renderer/points/mod.rs index f87448ce..e83beea3 100644 --- a/src/renderer/points/mod.rs +++ b/src/renderer/points/mod.rs @@ -1,7 +1,7 @@ use super::{Handle, UIPointType}; use skulpin::skia_safe::{ - Canvas, ContourMeasureIter, Font, FontMgr, FontStyle, Matrix, Paint, PaintStyle, Path, Point, - Rect, TextBlob, Typeface, Vector, + Canvas, ContourMeasureIter, Font, FontStyle, Matrix, Paint, PaintStyle, Path, Point, Rect, + TextBlob, Typeface, Vector, }; pub mod calc; use self::calc::*; @@ -10,13 +10,11 @@ use super::constants::*; use super::selbox; use crate::glifparser; use crate::state::{HandleStyle, PointLabels}; -use crate::util; + use crate::{STATE, TOOL_DATA}; // for get_outline(_mut)! use glifparser::{Point as GlifPoint, PointType}; -use std::iter::Peekable; - type Color = u32; trait SkiaFromGlyph { @@ -49,7 +47,7 @@ fn get_fill_and_stroke(kind: UIPointType, selected: bool) -> (Color, Color) { } pub fn draw_directions(path: Path, canvas: &mut Canvas) { - let mut piter = ContourMeasureIter::from_path(&path, false, None); + let piter = ContourMeasureIter::from_path(&path, false, None); for cm in piter { // Get vector and tangent -4 Skia units along the contur let (vec, tan) = cm.pos_tan(-4.).unwrap(); @@ -182,7 +180,7 @@ fn draw_string_at_point(mut at: (f32, f32), s: &str, canvas: &mut Canvas) { let blob = TextBlob::from_str(s, &font).expect(&format!("Failed to shape {}", s)); - let (scalar, rect) = font.measure_str(s, Some(&paint)); + let (_scalar, rect) = font.measure_str(s, Some(&paint)); let mut paint2 = Paint::default(); paint2.set_color(0xaa_ffffff); @@ -220,7 +218,7 @@ fn draw_point( POINT_STROKE_THICKNESS }; paint.set_stroke_width(thiccness * (1. / factor)); - let radius = if kind == UIPointType::Handle { + let _radius = if kind == UIPointType::Handle { HANDLE_RADIUS } else { POINT_RADIUS @@ -336,7 +334,6 @@ pub fn draw_complete_point( ); } -use state::PreviewMode; pub fn draw_all(canvas: &mut Canvas) { STATE.with(|v| { let mut i: isize = -1; diff --git a/src/renderer/selbox.rs b/src/renderer/selbox.rs index b7077541..b16f4f33 100644 --- a/src/renderer/selbox.rs +++ b/src/renderer/selbox.rs @@ -7,7 +7,7 @@ use skulpin::winit::dpi::PhysicalPosition; use std::cell::RefCell; use crate::state; -use state::State; +use crate::state::State; use crate::glifparser; diff --git a/src/state/mod.rs b/src/state/mod.rs index 388cbec0..5219bba3 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -1,20 +1,14 @@ //! Global thread local state. -use glifparser; -use imgui; +use glifparser::{Glif, Point}; + +pub use crate::renderer::console::Console as RendererConsole; +use crate::renderer::Guideline; -use glifparser::{Contour, Glif, Point}; -use mfeq_ipc::IPCInfo; -pub use renderer::console::Console as RendererConsole; -use renderer::Guideline; -use skulpin::skia_safe::Surface; use skulpin::winit::dpi::{PhysicalPosition, PhysicalSize}; use std::cell::RefCell; use std::path::PathBuf; -use std::rc::Rc; - -use derive_more::Display; mod tool_data; pub use self::tool_data::*; diff --git a/src/state/tool_data.rs b/src/state/tool_data.rs index 21c0d5d1..57f0e39e 100644 --- a/src/state/tool_data.rs +++ b/src/state/tool_data.rs @@ -35,7 +35,7 @@ impl ToolData { } use crate::events::MouseMeta; -use winit::event::{ModifiersState, MouseButton}; +use crate::winit::event::MouseButton; impl From for Follow { fn from(m: MouseMeta) -> Follow { match m { diff --git a/src/system_fonts.rs b/src/system_fonts.rs index ad47aba7..b452d746 100644 --- a/src/system_fonts.rs +++ b/src/system_fonts.rs @@ -1,4 +1,4 @@ -use renderer::constants::CONSOLE_FONTS; +use crate::renderer::constants::CONSOLE_FONTS; use font_kit::{ family_name::FamilyName as FKFamilyName, handle::Handle as FKHandle, properties::Properties, diff --git a/src/util/mod.rs b/src/util/mod.rs index a6592af7..3ff94b45 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -3,18 +3,16 @@ pub mod argparser; #[macro_use] pub mod macros; -use crate::glifparser::Codepoint; use std::env; -use std::fmt; -use std::option::Option; + use std::panic::set_hook; use backtrace::Backtrace; use colored::Colorize; lazy_static! { - pub static ref DEBUG: bool = { option_env!("DEBUG").is_some() }; - pub static ref DEBUG_EVENTS: bool = { option_env!("DEBUG_EVENTS").is_some() }; + pub static ref DEBUG: bool = option_env!("DEBUG").is_some(); + pub static ref DEBUG_EVENTS: bool = option_env!("DEBUG_EVENTS").is_some(); } #[macro_export] @@ -53,7 +51,7 @@ pub trait RoundFloat { } impl RoundFloat for f32 { - fn fround(self, digits: u8) -> Self { + fn fround(self, _digits: u8) -> Self { (self * 100.).round() / 100. } } diff --git a/util/add_all.rs b/util/add_all.sh similarity index 100% rename from util/add_all.rs rename to util/add_all.sh