chore: bump rust compiler version to 1.73.0 for JVM and python builds

This commit is contained in:
thunderbiscuit 2023-11-09 16:17:03 -06:00
parent fc4240ca38
commit a9c6aac6b9
No known key found for this signature in database
GPG Key ID: 88253696EB836462
10 changed files with 19 additions and 37 deletions

View File

@ -17,10 +17,8 @@ jobs:
strategy: strategy:
matrix: matrix:
rust: rust:
- version: 1.67.0 - version: 1.73.0
clippy: true clippy: true
# TODO 1: Should we keep this? We'll need to pin dependencies
# - version: 1.61.0 # MSRV
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -50,12 +48,6 @@ jobs:
- name: "Update toolchain" - name: "Update toolchain"
run: rustup update run: rustup update
- name: "Pin dependencies for MSRV"
if: matrix.rust.version == '1.61.0'
run: |
cargo update -p hashlink --precise "0.8.1"
cargo update -p tokio --precise "1.29.1"
cargo update -p flate2 --precise "1.0.26"
- name: "Build" - name: "Build"
run: cargo build run: cargo build

View File

@ -27,8 +27,8 @@ jobs:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: "Set default Rust version to 1.67.0" - name: "Set default Rust version to 1.73.0"
run: rustup default 1.67.0 run: rustup default 1.73.0
- name: "Build bdk-jvm library" - name: "Build bdk-jvm library"
run: | run: |

View File

@ -24,8 +24,8 @@ jobs:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: "Set default Rust version to 1.67.0" - name: "Set default Rust version to 1.73.0"
run: rustup default 1.67.0 run: rustup default 1.73.0
- name: "Install aarch64 Rust target" - name: "Install aarch64 Rust target"
run: rustup target add aarch64-apple-darwin run: rustup target add aarch64-apple-darwin
@ -54,8 +54,8 @@ jobs:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: "Set default Rust version to 1.67.0" - name: "Set default Rust version to 1.73.0"
run: rustup default 1.67.0 run: rustup default 1.73.0
- name: "Install x86_64-pc-windows-msvc Rust target" - name: "Install x86_64-pc-windows-msvc Rust target"
run: rustup target add x86_64-pc-windows-msvc run: rustup target add x86_64-pc-windows-msvc
@ -94,8 +94,8 @@ jobs:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: "Set default Rust version to 1.67.0" - name: "Set default Rust version to 1.73.0"
run: rustup default 1.67.0 run: rustup default 1.73.0
- name: "Build bdk-jvm library" - name: "Build bdk-jvm library"
run: | run: |

View File

@ -32,8 +32,8 @@ jobs:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: "Set default Rust version to 1.67.0" - name: "Set default Rust version to 1.73.0"
run: rustup default 1.67.0 run: rustup default 1.73.0
- name: "Run JVM tests" - name: "Run JVM tests"
run: | run: |

View File

@ -28,18 +28,7 @@ The below directories (a separate repository in the case of bdk-swift) include i
## Minimum Supported Rust Version (MSRV) ## Minimum Supported Rust Version (MSRV)
This library should compile with any combination of features with Rust 1.61.0. This library should compile with any combination of features with Rust 1.73.0.
To build with the MSRV you will need to pin dependencies as follows:
```shell
# required for sqlite feature, hashlink 0.8.2 has MSRV 1.61.0
cargo update -p hashlink --precise "0.8.1"
# tokio 1.30.0 has MSRV 1.63.0
cargo update -p tokio --precise "1.29.1"
# flate2 1.0.27 and up do not work with Rust 1.61.0, but 1.0.26 does
cargo update -p flate2 --precise "1.0.26"
```
## Contributing ## Contributing

View File

@ -54,10 +54,10 @@ curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh" source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 11.0.19-tem sdk install java 11.0.19-tem
``` ```
2. Install Rust (note that we are currently building using Rust 1.67.0): 2. Install Rust (note that we are currently building using Rust 1.73.0):
```shell ```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default 1.67.0 rustup default 1.73.0
``` ```
3. Clone this repository. 3. Clone this repository.
```shell ```shell
@ -95,6 +95,7 @@ Depending on the JVM version you use, you might not have the JNA dependency on y
```shell ```shell
class file for com.sun.jna.Pointer not found class file for com.sun.jna.Pointer not found
``` ```
The solution is to add JNA as a dependency like so: The solution is to add JNA as a dependency like so:
```kotlin ```kotlin
dependencies { dependencies {

View File

@ -9,7 +9,7 @@ cd ../bdk-ffi/
cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format
echo "Generating native binaries..." echo "Generating native binaries..."
rustup default 1.67.0 rustup default 1.73.0
cargo build --profile release-smaller cargo build --profile release-smaller
echo "Copying linux libbdkffi.so..." echo "Copying linux libbdkffi.so..."

View File

@ -9,7 +9,7 @@ cd ../bdk-ffi/
cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format
echo "Generating native binaries..." echo "Generating native binaries..."
rustup default 1.67.0 rustup default 1.73.0
rustup target add aarch64-apple-darwin rustup target add aarch64-apple-darwin
cargo build --profile release-smaller --target aarch64-apple-darwin cargo build --profile release-smaller --target aarch64-apple-darwin

View File

@ -9,7 +9,7 @@ cd ../bdk-ffi/
cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format
echo "Generating native binaries..." echo "Generating native binaries..."
rustup default 1.67.0 rustup default 1.73.0
rustup target add x86_64-apple-darwin rustup target add x86_64-apple-darwin
cargo build --profile release-smaller --target x86_64-apple-darwin cargo build --profile release-smaller --target x86_64-apple-darwin

View File

@ -9,7 +9,7 @@ cd ../bdk-ffi/
cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format cargo run --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format
echo "Generating native binaries..." echo "Generating native binaries..."
rustup default 1.67.0 rustup default 1.73.0
rustup target add x86_64-pc-windows-msvc rustup target add x86_64-pc-windows-msvc
cargo build --profile release-smaller --target x86_64-pc-windows-msvc cargo build --profile release-smaller --target x86_64-pc-windows-msvc