Skip to content

Commit

Permalink
vcpkg and mpir fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Sep 22, 2024
1 parent ed9461b commit 4e50a36
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:

- name: Install MPIR on Windows
if: matrix.os.name == 'Windows'
run: vcpkg install mpir
run: vcpkg install mpir:x64-windows-static

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -128,7 +128,6 @@ jobs:
run: |
cd rust_bindings
cp -r ../src cpp
git clone https://github.com/Chia-Network/mpir_gc_x64.git
- name: Publish to crates.io (dry run)
# We use `--allow-dirty` because the `cpp` folder is copied into the working directory.
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rust_bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ link-cplusplus = "1.0.9"
[build-dependencies]
bindgen = "0.69.4"
cmake = "0.1.50"
vcpkg = "0.2.15"

[dev-dependencies]
hex = "0.4.3"
Expand Down
2 changes: 1 addition & 1 deletion rust_bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn main() {
.unwrap()
);

println!("cargo:rustc-link-lib=static=mpir");
vcpkg::find_package("mpir").unwrap();
} else {
println!(
"cargo:rustc-link-search=native={}",
Expand Down

0 comments on commit 4e50a36

Please sign in to comment.