From 10be29c1216e05fa19cbd67b1ff476b72ffb0784 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Mon, 12 Jun 2023 12:20:36 +0200 Subject: [PATCH] Remove support for windows on arm, too complicated --- .github/workflows/release.yaml | 14 +--- .justfile | 8 +-- CHANGELOG.md | 1 + Cargo.lock | 115 +++++++++++++++++++++++++++++++++ Cargo.toml | 15 +---- 5 files changed, 124 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2330f21..5b7a31d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,37 +35,26 @@ jobs: runner-os: windows-latest artifact-name: lune-${{ needs.init.outputs.version }}-windows-x86_64 cargo-target: x86_64-pc-windows-msvc - cargo-features: reqwest/rustls-tls - - - name: Windows aarch64 - runner-os: windows-latest - artifact-name: lune-${{ needs.init.outputs.version }}-windows-aarch64 - cargo-target: aarch64-pc-windows-msvc - cargo-features: reqwest/default-tls - name: Linux x86_64 runner-os: ubuntu-latest artifact-name: lune-${{ needs.init.outputs.version }}-linux-x86_64 cargo-target: x86_64-unknown-linux-gnu - cargo-features: reqwest/rustls-tls - name: Linux aarch64 runner-os: ubuntu-latest artifact-name: lune-${{ needs.init.outputs.version }}-linux-aarch64 cargo-target: aarch64-unknown-linux-gnu - cargo-features: reqwest/rustls-tls - name: macOS x86_64 runner-os: macos-latest artifact-name: lune-${{ needs.init.outputs.version }}-macos-x86_64 cargo-target: x86_64-apple-darwin - cargo-features: reqwest/rustls-tls - name: macOS aarch64 runner-os: macos-latest artifact-name: lune-${{ needs.init.outputs.version }}-macos-aarch64 cargo-target: aarch64-apple-darwin - cargo-features: reqwest/rustls-tls name: Build - ${{ matrix.name }} runs-on: ${{ matrix.runner-os }} @@ -90,8 +79,7 @@ jobs: run: | cargo build \ --locked --release --all-features \ - --target ${{ matrix.cargo-target }} \ - --features ${{ matrix.cargo-features }} + --target ${{ matrix.cargo-target }} - name: Create binary archive shell: bash diff --git a/.justfile b/.justfile index c247ba6..b2f904a 100644 --- a/.justfile +++ b/.justfile @@ -1,18 +1,18 @@ # Run an individual test using the Lune CLI run-test TEST_NAME: - cargo run --features reqwest/rustls-tls -- "tests/{{TEST_NAME}}" + cargo run -- "tests/{{TEST_NAME}}" # Run an individual file using the Lune CLI run-file FILE_NAME: - cargo run --features reqwest/rustls-tls -- "{{FILE_NAME}}" + cargo run -- "{{FILE_NAME}}" # Run tests for the Lune library test: - cargo test --features reqwest/rustls-tls --package lune -- --test-threads 1 + cargo test --package lune -- --test-threads 1 # Run tests for the Lune CLI test-cli: - cargo test --features reqwest/rustls-tls --package lune-cli + cargo test --package lune-cli # Generate gitbook directory generate-gitbook: diff --git a/CHANGELOG.md b/CHANGELOG.md index ac7d64f..1a36364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed [`Instance:FindFirstDescendant`](https://create.roblox.com/docs/reference/engine/classes/Instance#FindFirstDescendant) which was a method that was never enabled in the official Roblox API and will soon be removed.
Use the second argument of the already existing find methods instead to find descendants. - Removed the global `printinfo` function - it was generally not used, and did not work as intended. Use the `stdio` builtin for formatting and logging instead. +- Removed support for Windows on ARM - it's more trouble than its worth right now, we may revisit it later. ### Added diff --git a/Cargo.lock b/Cargo.lock index 8909b9e..92db247 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -964,6 +964,19 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +dependencies = [ + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-tungstenite" version = "0.10.0" @@ -1716,6 +1729,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "ipnet", "js-sys", "log", @@ -1723,18 +1737,37 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "rmp" version = "0.8.11" @@ -1807,6 +1840,37 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustls" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.13" @@ -1825,6 +1889,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "semver" version = "0.9.0" @@ -1997,6 +2071,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "standback" version = "0.2.17" @@ -2263,6 +2343,16 @@ dependencies = [ "syn 2.0.18", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-tungstenite" version = "0.19.0" @@ -2424,6 +2514,12 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "2.4.0" @@ -2569,6 +2665,25 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 8aa40de..7deb7e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,9 @@ once_cell = "1.17" mlua = { version = "0.9.0-beta.3", features = ["luau", "serialize"] } tokio = { version = "1.24", features = ["full"] } +reqwest = { version = "0.11", default-features = false, features = [ + "rustls-tls", +] } # Serde dependencies, supporting user-facing formats: json, yaml, toml serde = { version = "1.0", features = ["derive"] } @@ -31,18 +34,6 @@ serde_json = { version = "1.0", features = ["preserve_order"] } serde_yaml = "0.9" toml = { version = "0.7", features = ["preserve_order"] } -# Using rustls instead of the default OpenSSL allows us to have much more portable binaries -# -# Notes: -# -# - Rustls does not yet compile on windows aarch64, so we use default tls there -# https://github.com/briansmith/ring/issues/1167 -# -# - Cargo does not support per-target features, we have to add the feature in the build command itself -# https://github.com/rust-lang/cargo/issues/1197 -# Check the `.justfile` or `.github/workflows/release.yaml` files for reference -reqwest = { version = "0.11", default-features = false } - # Profile for building the release binary, with the following options set: # # 1. Optimize for size