Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the installation of cbindgen to the Makefile #2887

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ build-wasm-bin: $(replay_wasm)
.PHONY: build-solidity
build-solidity: .make/solidity

.PHONY: ensure-cbindgen
ensure-cbindgen:
@if ! command -v cbindgen >/dev/null 2>&1; then \
echo "cbindgen not found. Installing..."; \
cargo install --force cbindgen; \
else \
echo "cbindgen already installed."; \
fi

.PHONY: contracts
contracts: .make/solgen
@printf $(done)
Expand Down Expand Up @@ -355,7 +364,7 @@ $(arbitrator_cases)/rust/$(wasm32_wasi)/%.wasm: $(arbitrator_cases)/rust/src/bin
$(arbitrator_cases)/go/testcase.wasm: $(arbitrator_cases)/go/*.go .make/solgen
cd $(arbitrator_cases)/go && GOOS=wasip1 GOARCH=wasm go build -o testcase.wasm

$(arbitrator_generated_header): $(DEP_PREDICATE) $(stylus_files)
$(arbitrator_generated_header): $(DEP_PREDICATE) $(stylus_files) ensure-cbindgen
@echo creating ${PWD}/$(arbitrator_generated_header)
mkdir -p `dirname $(arbitrator_generated_header)`
cd arbitrator/stylus && cbindgen --config cbindgen.toml --crate stylus --output ../../$(arbitrator_generated_header)
Expand Down
Loading