diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 3878bdc..d57bc10 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -18,25 +18,22 @@ jobs: build-github-pages: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 # repo checkout - - name: Setup toolchain for wasm - run: | - rustup update stable - rustup default stable - rustup set profile minimal - rustup target add wasm32-unknown-unknown - - name: Rust Cache # cache the rust build artefacts - uses: Swatinem/rust-cache@v2 - - name: Download and install Trunk binary - run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- - - name: Build # build + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@v2 + with: + tool: trunk@0.21.5 + - name: Build # Environment $public_url resolves to the github project page. # If using a user/organization page, remove the `${{ github.event.repository.name }}` part. # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested # relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which # will obviously return error 404 not found. - run: ./trunk build --release --public-url $public_url + run: trunk build --release --public-url $public_url env: public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}" - name: Deploy @@ -45,4 +42,4 @@ jobs: folder: dist # this option will not maintain any history of your previous pages deployment # set to false if you want all page build to be committed to your gh-pages branch history - single-commit: true + single-commit: false \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5fe0594..79db946 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,102 +1,85 @@ -on: [push, pull_request, workflow_dispatch] +on: [ + push, + pull_request, + workflow_dispatch, +] name: CI env: - RUSTFLAGS: -D warnings + # --cfg=web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses + # https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html + # https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html + RUSTFLAGS: -D warnings --cfg=web_sys_unstable_apis RUSTDOCFLAGS: -D warnings jobs: check: name: Check + strategy: + fail-fast: false + matrix: + include: + - TARGET: x86_64-unknown-linux-gnu + # If you add features to your crate, chances are you want to test for all features for native binaries, + # so that all features are checked and can be build by someone cloning your repository. + # If you build natively it will be a binary, the default binary will have the entrypoint "src/main.rs". + flags: "--all-features --bins" + - TARGET: wasm32-unknown-unknown + # With the current trunk setup, if you add features, the webpage will have the default features. + # You could test for all features too, however that might require a lot of conditional compilation annotations. + # Thus we only test for the default features by default. + # Since we build with trunk the entrypoint will also be the "src/main.rs" file. + flags: "--bin ${{ github.event.repository.name }}" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all-features - - check_wasm: - name: Check wasm32 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - target: wasm32-unknown-unknown - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all-features --lib --target wasm32-unknown-unknown + targets: ${{matrix.TARGET}} + - uses: Swatinem/rust-cache@v2 + - run: cargo check ${{matrix.flags}} --target ${{matrix.TARGET}} test: name: Test Suite runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev - - uses: actions-rs/cargo@v1 - with: - command: test - args: --lib + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo test --lib fmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: Swatinem/rust-cache@v2 + - run: cargo fmt --all -- --check clippy: name: Clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings + - uses: Swatinem/rust-cache@v2 + - run: cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all trunk: name: trunk runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: 1.81.0 - target: wasm32-unknown-unknown - override: true + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 - name: Download and install Trunk binary run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- - name: Build @@ -108,63 +91,87 @@ jobs: fail-fast: false matrix: include: - - os: macos-latest - TARGET: aarch64-apple-darwin + - os: macos-latest + # macos-latest seems to already run on arm64(=aarch64): + # https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories + TARGET: aarch64-apple-darwin - - os: ubuntu-latest - TARGET: aarch64-unknown-linux-gnu + - os: macos-latest + TARGET: x86_64-apple-darwin + # even though the runner uses arm64, MacOS on arm64 seems to support building for amd64. + # which makes sense, would be bad for devs otherwise. + cross: false - - os: ubuntu-latest - TARGET: armv7-unknown-linux-gnueabihf + - os: ubuntu-latest + TARGET: aarch64-unknown-linux-gnu + cross: true - - os: ubuntu-latest - TARGET: x86_64-unknown-linux-gnu + - os: ubuntu-latest + TARGET: armv7-unknown-linux-gnueabihf + cross: true - - os: windows-latest - TARGET: x86_64-pc-windows-msvc - EXTENSION: .exe + - os: ubuntu-latest + TARGET: x86_64-unknown-linux-gnu + + - os: windows-latest + TARGET: x86_64-pc-windows-msvc + EXTENSION: .exe steps: - - name: Building ${{ matrix.TARGET }} - run: echo "${{ matrix.TARGET }}" - - - uses: actions/checkout@master - - name: Install build dependencies - Rustup - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile default --target ${{ matrix.TARGET }} -y - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - # For linux, it's necessary to use cross from the git repository to avoid glibc problems - # Ref: https://github.com/cross-rs/cross/issues/1510 - - name: Install cross for linux - if: contains(matrix.TARGET, 'linux') - run: | - cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7 - - - name: Install cross for mac and windows - if: ${{ !contains(matrix.TARGET, 'linux') }} - run: | - cargo install cross - - - name: Build - run: | - cross build --verbose --release --target=${{ matrix.TARGET }} - - - name: Rename - run: cp target/${{ matrix.TARGET }}/release/eframe_template${{ matrix.EXTENSION }} eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - - - uses: actions/upload-artifact@master - with: - name: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - path: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - - - uses: svenstaro/upload-release-action@v2 - name: Upload binaries to release - if: ${{ github.event_name == 'push' }} - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - asset_name: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - tag: ${{ github.ref }} - prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} - overwrite: true + - uses: taiki-e/install-action@v2 + if: matrix.cross + with: + tool: cross@0.2.5 + # Github doesnt have runners with exotic architectures (eg. arm64/aarch64 on anything but macos). + # Thus we use cross. + # It's necessary to use an up-to-date cross from the git repository to avoid glibc problems on linux + # Ref: https://github.com/cross-rs/cross/issues/1510 + # if: matrix.cross + # run: | + # cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7 + + - name: Building ${{ matrix.TARGET }} + run: echo "${{ matrix.TARGET }}" + + - uses: actions/checkout@master + + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.TARGET }} + + - uses: Swatinem/rust-cache@v2 + with: + # this is required to avoid failures due to caching of artifacts for different architectures + # The reason is the potential usage of cross. + # The cache checks the rustc host which doesn't record us targeting + # different architectures (and native) with cross on the generic ubuntu-latest. + key: ${{ matrix.TARGET }} + + - if: ${{ !matrix.cross }} + name: Cargo Build + run: cargo build --verbose --release --target=${{ matrix.TARGET }} + + - if: matrix.cross + name: Cross Build + run: cross build --verbose --release --target=${{ matrix.TARGET }} + + - name: Rename + run: cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + + - uses: actions/upload-artifact@master + with: + name: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + path: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + + # this requires read-write permissions on the repo: + # https://github.com/svenstaro/upload-release-action/issues/70 + - uses: svenstaro/upload-release-action@v2 + name: Upload binaries to release + if: ${{ github.event_name == 'push' }} + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + asset_name: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + tag: ${{ github.ref }} + prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} + overwrite: true \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 80bc526..e0c0a07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ dependencies = [ "accesskit_consumer", "atspi-common", "serde", - "thiserror", + "thiserror 1.0.69", "zvariant", ] @@ -182,7 +182,7 @@ dependencies = [ "ndk-context", "ndk-sys 0.6.0+11769913", "num_enum", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -267,7 +267,7 @@ dependencies = [ "objc-foundation", "objc_id", "parking_lot", - "thiserror", + "thiserror 1.0.69", "winapi", "x11rb", ] @@ -665,7 +665,7 @@ dependencies = [ "polling", "rustix", "slab", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -808,7 +808,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.5.0", + "foreign-types", "libc", ] @@ -992,7 +992,7 @@ dependencies = [ "epaint", "log", "profiling", - "thiserror", + "thiserror 1.0.69", "type-map", "web-time", "wgpu", @@ -1060,15 +1060,6 @@ dependencies = [ "serde", ] -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "endi" version = "1.1.0" @@ -1119,9 +1110,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -1266,15 +1257,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared 0.1.1", -] - [[package]] name = "foreign-types" version = "0.5.0" @@ -1282,7 +1264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared 0.3.1", + "foreign-types-shared", ] [[package]] @@ -1296,12 +1278,6 @@ dependencies = [ "syn", ] -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -1319,9 +1295,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1334,9 +1310,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1344,15 +1320,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1361,9 +1337,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1380,9 +1356,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1391,21 +1367,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1446,8 +1422,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1726,22 +1704,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", + "webpki-roots", ] [[package]] @@ -1856,7 +1819,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -2009,7 +1972,7 @@ dependencies = [ "bitflags 2.6.0", "block", "core-graphics-types", - "foreign-types 0.5.0", + "foreign-types", "log", "objc", "paste", @@ -2065,30 +2028,13 @@ dependencies = [ "hexf-parse", "indexmap", "log", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", - "thiserror", + "thiserror 1.0.69", "unicode-xid", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndk" version = "0.9.0" @@ -2101,7 +2047,7 @@ dependencies = [ "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2436,50 +2382,6 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" -[[package]] -name = "openssl" -version = "0.10.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "foreign-types 0.3.2", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "orbclient" version = "0.3.47" @@ -2686,6 +2588,58 @@ dependencies = [ "memchr", ] +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.0", + "rustls", + "socket2", + "thiserror 2.0.9", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom", + "rand", + "ring", + "rustc-hash 2.1.0", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.9", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +dependencies = [ + "cfg_aliases 0.2.1", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -2783,7 +2737,6 @@ checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", - "encoding_rs", "futures-core", "futures-util", "h2", @@ -2792,30 +2745,31 @@ dependencies = [ "http-body-util", "hyper", "hyper-rustls", - "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", - "tokio-native-tls", + "tokio-rustls", "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "windows-registry", ] @@ -2871,6 +2825,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustix" version = "0.38.28" @@ -2891,6 +2851,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -2911,6 +2872,9 @@ name = "rustls-pki-types" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -2938,15 +2902,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -2959,43 +2914,20 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -3101,7 +3033,7 @@ dependencies = [ "log", "memmap2", "rustix", - "thiserror", + "thiserror 1.0.69", "wayland-backend", "wayland-client", "wayland-csd-frame", @@ -3195,27 +3127,6 @@ dependencies = [ "futures-core", ] -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tempfile" version = "3.9.0" @@ -3244,7 +3155,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +dependencies = [ + "thiserror-impl 2.0.9", ] [[package]] @@ -3258,6 +3178,17 @@ dependencies = [ "syn", ] +[[package]] +name = "thiserror-impl" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -3288,16 +3219,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.1" @@ -3414,7 +3335,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", ] [[package]] @@ -3496,12 +3417,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" @@ -3747,6 +3662,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "wgpu" version = "23.0.1" @@ -3789,9 +3713,9 @@ dependencies = [ "parking_lot", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 1.0.69", "wgpu-hal", "wgpu-types", ] @@ -3827,9 +3751,9 @@ dependencies = [ "profiling", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 1.0.69", "wasm-bindgen", "web-sys", "wgpu-types", diff --git a/Cargo.toml b/Cargo.toml index 2c3702c..b933dee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ rust-version = "1.81" [package.metadata.docs.rs] all-features = true -targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu","wasm32-unknown-unknown"] +targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", "wasm32-unknown-unknown"] [dependencies] egui = "0.30" @@ -19,17 +19,17 @@ eframe = { version = "0.30", default-features = false, features = [ "persistence", # Enable restoring app state when restarting the app. "wayland", # To support Linux (and CI) ] } -log = "0.4" - -serde = { version = "1", features = ["derive"] } +log = "0.4.22" +serde = { version = "1.0.217", features = ["derive"] } egui_logger = "0.6.2" poll-promise = "0.3.0" -reqwest = { version = "0.12.12", features = ["json"] } -futures = "0.3.30" +# reqwest default used hyper-tls which depended on openssl-sys +reqwest = { version = "0.12.12", default-features = false, features = ["http2", "json", "rustls-tls"] } +futures = "0.3.31" # native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -env_logger = "0.11" +env_logger = "0.11.6" reqwest-cross = { version = "0.4.2", features = ["native-tokio"] } tokio = { version = "1.42.0", features = ["rt-multi-thread"] } @@ -37,8 +37,8 @@ tokio = { version = "1.42.0", features = ["rt-multi-thread"] } # web: [target.'cfg(target_arch = "wasm32")'.dependencies] poll-promise = { version = "0.3.0", features = ["web"] } -wasm-bindgen-futures = "0.4" -web-sys = "0.3.70" # to access the DOM (to hide the loading text) +wasm-bindgen-futures = "0.4.49" +web-sys = "0.3.76" # to access the DOM (to hide the loading text) reqwest-cross = { version = "0.4.2", default-features = false, features = ["web-sys"] } diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 0000000..8c976b9 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,10 @@ +# edge is up to date, stable in 2 years old... +# https://github.com/lstrojny/prometheus-weathermen/blob/4795eceb69254204303ed29967a34cba1e98d87c/Cross.toml +[target.x86_64-unknown-linux-gnu] +image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:edge" + +[target.aarch64-unknown-linux-gnu] +image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge" + +[target.armv7-unknown-linux-gnueabihf] +image = "ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:edge"