From 4a82f9e6e0431585ef00629f95e27f9041706b22 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sat, 15 Apr 2023 18:54:54 -0500 Subject: [PATCH] Include the wrapper for librustzcash --- configure | 4 ++++ package.yaml | 2 +- src/C/GettingStarted.chs | 12 ------------ src/C/Zcash.chs | 2 +- zcash-haskell.cabal | 3 +-- 5 files changed, 7 insertions(+), 16 deletions(-) create mode 100755 configure delete mode 100644 src/C/GettingStarted.chs diff --git a/configure b/configure new file mode 100755 index 0000000..0af689b --- /dev/null +++ b/configure @@ -0,0 +1,4 @@ +#!/bin/bash + +export PKG_CONFIG_PATH=$(pwd)/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug +export LD_LIBRARY_PATH=$(pwd)/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug diff --git a/package.yaml b/package.yaml index 3182baf..4abaff2 100644 --- a/package.yaml +++ b/package.yaml @@ -30,7 +30,7 @@ library: - text - foreign-rust pkg-config-dependencies: - - rust_wrapper-uninstalled + - rustzcash_wrapper-uninstalled tests: zcash-haskell-test: diff --git a/src/C/GettingStarted.chs b/src/C/GettingStarted.chs deleted file mode 100644 index 36e4c4e..0000000 --- a/src/C/GettingStarted.chs +++ /dev/null @@ -1,12 +0,0 @@ -module C.GettingStarted (rustWrapperAdd) where - -#include "rust_wrapper.h" - -import Data.Word - -{# fun pure unsafe rust_wrapper_add as rustWrapperAdd - { `Word64' - , `Word64' - } - -> `Word64' -#} diff --git a/src/C/Zcash.chs b/src/C/Zcash.chs index 05a5d2a..17cdeb5 100644 --- a/src/C/Zcash.chs +++ b/src/C/Zcash.chs @@ -5,7 +5,7 @@ module C.Zcash where -#include "rust_wrapper.h" +#include "rustzcash_wrapper.h" import qualified Data.ByteString as BS import Codec.Borsh diff --git a/zcash-haskell.cabal b/zcash-haskell.cabal index 1f60903..a4f20d2 100644 --- a/zcash-haskell.cabal +++ b/zcash-haskell.cabal @@ -25,7 +25,6 @@ source-repository head library exposed-modules: - C.GettingStarted C.Zcash Zcash other-modules: @@ -33,7 +32,7 @@ library hs-source-dirs: src pkgconfig-depends: - rust_wrapper-uninstalled + rustzcash_wrapper-uninstalled build-depends: base >=4.7 && <5 , borsh