Skip to content

Commit

Permalink
chore: bump rust compiler version to 1.73.0 for JVM and python builds
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Nov 9, 2023
1 parent fc4240c commit a9c6aac
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 37 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ jobs:
strategy:
matrix:
rust:
- version: 1.67.0
- version: 1.73.0
clippy: true
# TODO 1: Should we keep this? We'll need to pin dependencies
# - version: 1.61.0 # MSRV
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down Expand Up @@ -50,12 +48,6 @@ jobs:
- name: "Update toolchain"
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"
run: cargo build

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/live-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.73.0"
run: rustup default 1.73.0

- name: "Build bdk-jvm library"
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.73.0"
run: rustup default 1.73.0

- name: "Install aarch64 Rust target"
run: rustup target add aarch64-apple-darwin
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.73.0"
run: rustup default 1.73.0

- name: "Install x86_64-pc-windows-msvc Rust target"
run: rustup target add x86_64-pc-windows-msvc
Expand Down Expand Up @@ -94,8 +94,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.73.0"
run: rustup default 1.73.0

- name: "Build bdk-jvm library"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.73.0"
run: rustup default 1.73.0

- name: "Run JVM tests"
run: |
Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ The below directories (a separate repository in the case of bdk-swift) include i

## Minimum Supported Rust Version (MSRV)

This library should compile with any combination of features with Rust 1.61.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"
```
This library should compile with any combination of features with Rust 1.73.0.

## Contributing

Expand Down
5 changes: 3 additions & 2 deletions bdk-jvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
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
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.
```shell
Expand Down Expand Up @@ -95,6 +95,7 @@ Depending on the JVM version you use, you might not have the JNA dependency on y
```shell
class file for com.sun.jna.Pointer not found
```

The solution is to add JNA as a dependency like so:
```kotlin
dependencies {
Expand Down
2 changes: 1 addition & 1 deletion bdk-python/scripts/generate-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

echo "Generating native binaries..."
rustup default 1.67.0
rustup default 1.73.0
cargo build --profile release-smaller

echo "Copying linux libbdkffi.so..."
Expand Down
2 changes: 1 addition & 1 deletion bdk-python/scripts/generate-macos-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

echo "Generating native binaries..."
rustup default 1.67.0
rustup default 1.73.0
rustup target add aarch64-apple-darwin
cargo build --profile release-smaller --target aarch64-apple-darwin

Expand Down
2 changes: 1 addition & 1 deletion bdk-python/scripts/generate-macos-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

echo "Generating native binaries..."
rustup default 1.67.0
rustup default 1.73.0
rustup target add x86_64-apple-darwin
cargo build --profile release-smaller --target x86_64-apple-darwin

Expand Down
2 changes: 1 addition & 1 deletion bdk-python/scripts/generate-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

echo "Generating native binaries..."
rustup default 1.67.0
rustup default 1.73.0
rustup target add x86_64-pc-windows-msvc
cargo build --profile release-smaller --target x86_64-pc-windows-msvc

Expand Down

0 comments on commit a9c6aac

Please sign in to comment.