-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6ef779
commit 8c8143b
Showing
1 changed file
with
39 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,44 @@ | ||
Build steps: | ||
# Build and Test Instructions | ||
|
||
1. `cargo build` | ||
2. `cabal build` | ||
## Prerequisites | ||
|
||
Test with | ||
Before building and testing the project, make sure you have the following installed: | ||
|
||
### 1. Install Go | ||
If you don't already have Go installed, you can install it using the following commands: | ||
|
||
```bash | ||
# For Linux and macOS: | ||
wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz | ||
sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz | ||
export PATH=$PATH:/usr/local/go/bin | ||
|
||
# For macOS using Homebrew: | ||
brew install go | ||
|
||
# For Windows: | ||
Download the installer from https://go.dev/dl/ and follow the installation instructions. | ||
``` | ||
|
||
### 2. Install Rust | ||
Make sure you have Rust installed by following the instructions [here](https://rustup.rs/).. | ||
|
||
### 3. Install Haskell (Cabal) | ||
Ensure that you have Haskell and Cabal installed by following the instructions [here](https://www.haskell.org/cabal/). | ||
|
||
## Build steps | ||
- Build the Rust part of the project: | ||
```bash | ||
cargo build | ||
``` | ||
- Build the Haskell part of the project: | ||
```bash | ||
cabal build | ||
``` | ||
$ cabal repl | ||
$ ghci> :set -Ltarget/debug -lplonk_verify | ||
ghci> withCString "Rust" hello | ||
Hello, Rust! | ||
ghci> babybearinv 1 | ||
1 | ||
ghci> babybearinv 2 | ||
1006632961 | ||
ghci> | ||
|
||
## Testing | ||
To run tests for the Rust components, execute: | ||
|
||
```bash | ||
cargo test | ||
``` |