Skip to content

Commit

Permalink
Merge PR #162: Add future backends
Browse files Browse the repository at this point in the history
  • Loading branch information
cwgoes committed Nov 9, 2019
1 parent 4a0358f commit 3fcd867
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 8 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ all: setup build
setup:
stack build --only-dependencies

build-libff:
./scripts/build-libff.sh

build-z3:
mkdir -p $(PREFIX)
cd z3 && test -f build/Makefile || python scripts/mk_make.py -p $(PREFIX)
Expand Down Expand Up @@ -42,4 +45,4 @@ clean:
clean-full:
stack clean --full

.PHONY: all setup build build-z3 build-watch build-opt lint format test repl-lib repl-exe clean clean-full
.PHONY: all setup build build-libff build-z3 build-watch build-opt lint format test repl-lib repl-exe clean clean-full
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ See [CONTRIBUTING.md](./doc/CONTRIBUTING.md).
## Installation

Requirements for installing:

- [Stack](https://haskellstack.org)
- [z3](https://github.com/Z3Prover/z3)
- [z3](https://github.com/Z3Prover/z3) (this can be installed with `make build-z3`)
- [libff](https://github.com/scipr-lab/libff) (this can be installed with `make build-libff`)
- [LLVM9](https://llvm.org/)


Expand Down
2 changes: 2 additions & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ dependencies:
- bytestring
- time
- morley
- bulletproofs
- hevm

default-extensions:
- NoImplicitPrelude
Expand Down
8 changes: 5 additions & 3 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM fpco/stack-build:lts-13.30

RUN ln -s /usr/bin/g++-7 /usr/bin/g++
FROM fpco/stack-build:lts-14.12

RUN git clone https://github.com/Z3Prover/z3.git && cd z3 && python scripts/mk_make.py && cd build && make && make install

Expand All @@ -11,3 +9,7 @@ ENV LLVM_VERSION 9.0.0
# Install Clang and LLVM
COPY llvm-install.sh .
RUN ./llvm-install.sh

# Install libff
COPY ./build-libff.sh .
RUN ./build-libff.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh

set -xe

time docker build -t cryptiumlabs/juvix-ci .
docker push cryptiumlabs/juvix-ci
15 changes: 15 additions & 0 deletions scripts/build-libff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

set -xe

cd /tmp
rm -rf libff
git clone https://github.com/scipr-lab/libff --recursive
cd libff
ARGS="-DWITH_PROCPS=OFF -DCURVE=ALT_BN128 -DCMAKE_INSTALL_PREFIX:PATH=/usr"
sed -i 's/STATIC/SHARED/' libff/CMakeLists.txt
sed -i 's/STATIC/SHARED/' depends/CMakeLists.txt
mkdir build
cd build
CXXFLAGS="-fPIC $CXXFLAGS" cmake $ARGS ..
make -j $(nproc) && sudo make install
3 changes: 1 addition & 2 deletions scripts/llvm-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ cd ../..
rm llvm-${LLVM_VERSION}.src.tar.xz
rm -rf llvm-${LLVM_VERSION}.src


# This fixes the error with libLLVM-9.so for some reason!!!!
apt-get update
apt-get install ranger
apt-get -y install ranger
25 changes: 24 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,37 @@ extra-deps:
- llvm-hs-pure-9.0.0
- capability-0.2.0.0@sha256:7049527e0bede44f8aeabdd0f41c50ec78da5835796e6a477615502665127a62,2424
- fgl-visualize-0.1.0.1@sha256:e682066053a6e75478a08fd6822dd0143a3b8ea23244bdb01dd389a266447c5e,995
- hevm-0.24@sha256:8ce0c937a093615e64088d020ef3b66ff58276dc585264b876932f2fa82b2a85,5908
- morley-0.3.0.1@sha256:dc7586ba0c1a2a5ba4a3e4a5afa4527463b91c73dfb58a7162d4297a97eb7688,10436
- aeson-options-0.1.0@sha256:2d0c25afbb2d038bd5b57de8d042e319ea1a5ec7d7b92810d8a0cf0777882b6a,1244
- base58-bytestring-0.1.0@sha256:a1da72ee89d5450bac1c792d9fcbe95ed7154ab7246f2172b57bd4fd9b5eab79,1913
- hex-text-0.1.0.0@sha256:52dc2cf5ce45f7d86ea5e56e2ac57820f788c10bbb3fe83f6d57e678a426305b,1072
- morley-prelude-0.2.0.1@sha256:307db535ef79b0e0ed40c7bfbe305cd67c7561f686ae46bf985a971a9a064f5c,2083
- ghci-pretty-0.0.2@sha256:5f6c2a9f1d391aa0ad3c3d0bfe1f39decfe94be50fbf5a5279e2dbc18f8b4c51,1409
- restless-git-0.7@sha256:346a5775a586f07ecb291036a8d3016c3484ccdc188b574bcdec0a82c12db293,968
- s-cargot-0.1.4.0@sha256:61ea1833fbb4c80d93577144870e449d2007d311c34d74252850bb48aa8c31fb,3525
- semver-range-0.2.8@sha256:44918080c220cf67b6e7c8ad16f01f3cfe1ac69d4f72e528e84d566348bb23c3,1941
- tree-view-0.5@sha256:85fbc67b53c1ef47f020a69051e6a29b27481698fe802cd2ed8ab0108aa69a38,1231
- HSH-2.1.3@sha256:71ded11b224f5066373ce985ec63b10c87129850b33916736dd64fa2bea9ea0a,1705
- ipprint-0.6@sha256:48ffe7c5acab06fbd70a68aa12bc980cc33dcf8f41bd76d692e3dee8805584c7,1417
- Unixutils-1.54.1@sha256:c6afbaf6d68ba229d0d262e066376c300f25b798d5752f162476155cadf1114d,1123
- show-please-0.5.5@sha256:5ca32d758486dfb839ec428a8bf356187e1ac8e440cd90585e92b1ded2b3ae87,681
- userid-0.1.3.3@sha256:5c0bc9403d906787ee0e9fbc98c28bc2ac757aa9ef82059a41230c9f87e2618b,1136
- boomerang-1.4.5.6@sha256:4f8407b9482a500ef9f8dc3fa13f9615d4d33a7c530b67c1ca27535e136a152d,1965
- web-routes-th-0.22.6.4@sha256:1e7817a65a8908d6c681790a534e583371a16680c7951d11901202c121c722fb,1547
- unexceptionalio-0.4.0@sha256:c59fa6be7b923fa32ad6a830f96918cd3019b5a6dba019c81da19df9955d8d58,1239
- brick-0.46
- github: acid-state/safecopy
commit: 1be0894daeefff5126b25c9483ce2bf21845d05b
- github: seereason/sr-extra
commit: d5435dcb2ae5da5f9e0fb8e5a3c40f99937a046f
- github: cwgoes/haskell-z3
commit: 889597234bcdf5620c5a69d3405ab4d607ba4d71
- github: cwgoes/uuid-orphans
commit: e23b58b46affb978c17a0eb3e760d28b058658ce
- github: dapphub/dapptools
commit: 38dd682fa6c433e5720bd9022779ffc6a1ce00fc
subdirs:
- src/hevm

allow-newer: true

Expand Down

0 comments on commit 3fcd867

Please sign in to comment.