Skip to content

Commit 1d7b189

Browse files
NicolasRampoldiuri-99MauroToscano
authored
fix: add dependencies that vary depending on the os to make deps (#117)
Co-authored-by: Urix <43704209+uri-99@users.noreply.github.com> Co-authored-by: MauroFab <maurotoscano2@gmail.com> Co-authored-by: Mauro Toscano <12560266+MauroToscano@users.noreply.github.com>
1 parent bca9534 commit 1d7b189

2 files changed

Lines changed: 38 additions & 24 deletions

File tree

Makefile

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
.PHONY: help tests
22

3+
OS := $(shell uname -s)
4+
35
CONFIG_FILE?=config-files/config.yaml
46

7+
ifeq ($(OS),Linux)
8+
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
9+
endif
10+
11+
ifeq ($(OS),Darwin)
12+
BUILD_ALL_FFI = $(MAKE) build_all_ffi_macos
13+
endif
14+
515
help:
616
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
717

8-
deps: ## Install deps
18+
submodules:
919
git submodule update --init --recursive
20+
@echo "Updated submodules"
21+
22+
deps: submodules build_all_ffi ## Install deps
23+
24+
go_deps:
25+
@echo "Installing Go dependencies..."
1026
go install github.com/maoueh/zap-pretty@latest
1127
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
28+
go install github.com/Layr-Labs/eigenlayer-cli/cmd/eigenlayer@latest
1229

1330
install_foundry:
1431
curl -L https://foundry.paradigm.xyz | bash
1532

16-
install_eigenlayer_cli:
17-
@go install github.com/Layr-Labs/eigenlayer-cli/cmd/eigenlayer@latest
18-
1933
anvil_deploy_eigen_contracts:
2034
@echo "Deploying Eigen Contracts..."
2135
. contracts/scripts/anvil/deploy_eigen_contracts.sh
@@ -542,10 +556,15 @@ generate_halo2_ipa_proof:
542556
RUST_LOG=info cargo run --release && \
543557
echo "Generating halo2 plonk proof..." && \
544558
echo "Generated halo2 plonk proof!"
545-
559+
546560

547561
__BUILD_ALL_FFI__:
548-
build_all_ffis_macos: ## Build all FFIs for macOS
562+
563+
build_all_ffi: ## Build all FFIs
564+
$(BUILD_ALL_FFI)
565+
@echo "Created FFIs"
566+
567+
build_all_ffi_macos: ## Build all FFIs for macOS
549568
@echo "Building all FFIs for macOS..."
550569
@$(MAKE) build_sp1_macos
551570
@$(MAKE) build_risc_zero_macos
@@ -554,16 +573,17 @@ build_all_ffis_macos: ## Build all FFIs for macOS
554573
@$(MAKE) build_halo2_kzg_macos
555574
@echo "All macOS FFIs built successfully."
556575

557-
build_all_ffis_linux: ## Build all FFIs for Linux
576+
build_all_ffi_linux: ## Build all FFIs for Linux
558577
@echo "Building all FFIs for Linux..."
559578
@$(MAKE) build_sp1_linux
560579
@$(MAKE) build_risc_zero_linux
561580
# @$(MAKE) build_merkle_tree_linux
562581
@$(MAKE) build_halo2_ipa_linux
563582
@echo "All Linux FFIs built successfully."
564583

584+
565585
__EXPLORER__:
566-
run_devnet_explorer:
586+
run_devnet_explorer:
567587
@cd explorer/ && \
568588
mix setup && \
569589
cp .env.dev .env && \

README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [Explorer](#explorer)
1616
- [Notes on project creation / devnet deployment](#notes-on-project-creation--devnet-deployment)
1717
- [Tests](#tests)
18+
- [Verify Proofs](#verify-proofs)
1819
- [FAQ](#faq)
1920

2021
## The Project
@@ -132,39 +133,32 @@ Ensure you have the following installed:
132133
- [jq](https://jqlang.github.io/jq/)
133134
- [yq](https://github.com/mikefarah/yq)
134135

135-
Install zap-pretty and abigen:
136+
To install [Go](https://go.dev/doc/install), [Rust](https://www.rust-lang.org/tools/install), [jq](https://jqlang.github.io/jq/) and [yq](https://github.com/mikefarah/yq) go to the provided links and follow the instructions.
137+
138+
Install Go dependencies ([zap-pretty](https://github.com/maoueh/zap-pretty), [abigen](https://geth.ethereum.org/docs/tools/abigen), [eigenlayer-cli](https://github.com/Layr-Labs/eigenlayer-cli.git)):
136139

137140
```bash
138-
make deps
141+
make go_deps
139142
```
140143

141-
Install foundry:
144+
Install [Foundry](https://book.getfoundry.sh/getting-started/installation):
142145

143146
```bash
144147
make install_foundry
145148
foundryup
146149
```
147150

148-
Install eigenlayer-cli:
151+
Install necessary submodules and build all the FFIs for your OS:
149152

150153
```bash
151-
make install_eigenlayer_cli
154+
make deps
152155
```
153-
#### Building FFIs
154156

155-
##### For macOS:
156-
To build all FFIs for macOS environments, run the following command in your terminal:
157-
```bash
158-
make build_all_ffis_macos
159-
```
160-
This command compiles all necessary Rust libraries into dynamic libraries (.dylib files) that can be used in macOS applications
157+
If you want to rebuild the FFIs you can use:
161158

162-
##### For Linux:
163-
To build all FFIs for Linux environments, use this command:
164159
```bash
165-
make build_all_ffis_linux
160+
make build_all_ffi
166161
```
167-
This will compile all necessary Rust libraries into .so files (shared objects) that are usable within Linux applications.
168162

169163
### Booting Devnet with Default configs
170164

0 commit comments

Comments
 (0)