Compare commits
No commits in common. "6e11ae7779937c367731569f159f80a6180ebc38" and "9713203e2bd10d5b3b623561564c82a8d7614ec8" have entirely different histories.
6e11ae7779
...
9713203e2b
3 changed files with 35 additions and 4 deletions
31
Makefile
Normal file
31
Makefile
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Copyright 2022-2024 Vergara Technologies LLC
|
||||||
|
#
|
||||||
|
# This file is part of Zcash-Haskell.
|
||||||
|
#
|
||||||
|
# Zcash-Haskell is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Lesser General Public License as published by the Free
|
||||||
|
# Software Foundation, either version 3 of the License, or (at your option) any
|
||||||
|
# later version.
|
||||||
|
#
|
||||||
|
# Zcash-Haskell is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
|
# details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
# Zcash-Haskell. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
rustlib := librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
all: haskell
|
||||||
|
|
||||||
|
test: test/Spec.hs haskell
|
||||||
|
stack test
|
||||||
|
|
||||||
|
haskell: src/ZcashHaskell/Orchard.hs src/ZcashHaskell/Sapling.hs src/ZcashHaskell/Types.hs src/ZcashHaskell/Utils.hs src/C/Zcash.chs package.yaml stack.yaml $(rustlib)/rustzcash_wrapper.h $(rustlib)/librustzcash_wrapper.a $(rustlib)/librustzcash_wrapper.so $(rustlib)/rustzcash_wrapper-uninstalled.pc
|
||||||
|
stack build
|
||||||
|
|
||||||
|
$(rustlib)/rustzcash_wrapper.h: librustzcash-wrapper/src/lib.rs librustzcash-wrapper/Cargo.toml
|
||||||
|
cd librustzcash-wrapper && cargo +nightly-2024-02-04 cbuild
|
|
@ -17,10 +17,7 @@ A Haskell library to interact with the Zcash blockchain.
|
||||||
```
|
```
|
||||||
./configure
|
./configure
|
||||||
```
|
```
|
||||||
- Compile the Rust and Haskell portions:
|
- Compile the Rust and Haskell portions: `make`
|
||||||
```
|
|
||||||
cabal build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
|
||||||
|
|
3
Setup.hs
3
Setup.hs
|
@ -93,7 +93,10 @@ rsAddDirs lbi' = do
|
||||||
updateLibBi libBuild =
|
updateLibBi libBuild =
|
||||||
libBuild
|
libBuild
|
||||||
{ includeDirs = rustIncludeDir : includeDirs libBuild
|
{ includeDirs = rustIncludeDir : includeDirs libBuild
|
||||||
|
, extraLibs = "rustzcash_wrapper" : extraLibs libBuild
|
||||||
, extraLibDirs = rustLibDir : extraLibDirs libBuild
|
, extraLibDirs = rustLibDir : extraLibDirs libBuild
|
||||||
|
, extraBundledLibs = "rustzcash_wrapper" : extraBundledLibs libBuild
|
||||||
|
, ldOptions = ("-L" ++ localData) : ldOptions libBuild
|
||||||
}
|
}
|
||||||
copyDir rustLibDir localData
|
copyDir rustLibDir localData
|
||||||
pure $ updateLbi lbi'
|
pure $ updateLbi lbi'
|
||||||
|
|
Loading…
Reference in a new issue