-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from OffchainLabs/develop
Merge develop into main
- Loading branch information
Showing
16 changed files
with
319 additions
and
158 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
./target |
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
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
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,11 +1,15 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
FROM rust:1.80 AS builder | ||
ARG BUILD_PLATFORM=linux/amd64 | ||
ARG RUST_VERSION=1.80 | ||
ARG CARGO_STYLUS_VERSION=0.5.6 | ||
|
||
FROM --platform=${BUILD_PLATFORM} rust:${RUST_VERSION} AS builder | ||
RUN apt-get update && apt-get install -y git | ||
RUN rustup target add x86_64-unknown-linux-gnu | ||
RUN git clone https://github.com/offchainlabs/cargo-stylus.git | ||
ARG CARGO_STYLUS_VERSION | ||
RUN test -n "$CARGO_STYLUS_VERSION" | ||
RUN git clone --branch v$CARGO_STYLUS_VERSION https://github.com/offchainlabs/cargo-stylus.git | ||
WORKDIR /cargo-stylus | ||
RUN git checkout v0.5.6 | ||
RUN cargo build --release --manifest-path main/Cargo.toml | ||
|
||
FROM rust:1.80 | ||
FROM --platform=${BUILD_PLATFORM} rust:${RUST_VERSION} AS cargo-stylus-base | ||
COPY --from=builder /cargo-stylus/target/release/cargo-stylus /usr/local/bin/cargo-stylus |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
CARGO_STYLUS_VERSION := $(shell cargo pkgid --manifest-path main/Cargo.toml | cut -d '@' -f 2) | ||
|
||
.PHONY: build | ||
build: | ||
cargo build | ||
|
||
.PHONY: test | ||
test: | ||
cargo test | ||
|
||
.PHONY: bench | ||
bench: | ||
cargo +nightly bench -F nightly | ||
|
||
.PHONY: fmt | ||
fmt: | ||
cargo fmt | ||
|
||
.PHONY: lint | ||
lint: | ||
cargo clippy --package cargo-stylus --package cargo-stylus-example | ||
|
||
.PHONY: install | ||
install: fmt lint | ||
cargo install --path main | ||
|
||
.PHONY: docker | ||
docker: | ||
docker build -t cargo-stylus-base:$(CARGO_STYLUS_VERSION) --build-arg CARGO_STYLUS_VERSION=$(CARGO_STYLUS_VERSION) . |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.