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

Merge All Current Cargo Stylus Subcommands Into Main Package #82

Merged
merged 30 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
202ff69
caching updates
rauljordan Aug 13, 2024
0e67c52
place bid command
rauljordan Aug 13, 2024
8f5bd82
add status command
rauljordan Aug 15, 2024
864779d
cache subcommands
rauljordan Aug 15, 2024
05ea855
cache updates
rauljordan Aug 15, 2024
e9969c0
stylus cache manager cli
rauljordan Aug 15, 2024
3b0f73f
Merge branch 'main' into cache-updates
rauljordan Aug 15, 2024
82e08d4
merge main
rauljordan Aug 15, 2024
22d904e
pin alloy versions
rauljordan Aug 15, 2024
f9c99f5
edit
rauljordan Aug 15, 2024
6036b5d
pin
rauljordan Aug 15, 2024
40eb1c1
rem constant
rauljordan Aug 15, 2024
b00f017
estimate gas
rauljordan Aug 16, 2024
58cf3ff
fix up estimate gas
rauljordan Aug 16, 2024
d2851f3
edits
rauljordan Aug 16, 2024
00abf34
strip data check works
rauljordan Aug 16, 2024
e5806ac
edit note
rauljordan Aug 16, 2024
1f25d9b
Merge branch 'strip-metadata-from-user-wasms' into revamp-packages
rauljordan Aug 16, 2024
6d86397
Merge branch 'pin-alloy' into revamp-packages
rauljordan Aug 16, 2024
26d34db
Merge branch 'fix-estimate-gas' into revamp-packages
rauljordan Aug 16, 2024
476d4a3
unify cargo stylus subcommands
rauljordan Aug 16, 2024
12d67fd
version bump
rauljordan Aug 16, 2024
3c5b3ae
merge all necessary subcommands into cargo stylus
rauljordan Aug 16, 2024
f312153
use visible alias
rauljordan Aug 19, 2024
2f0ce89
update readme
rauljordan Aug 19, 2024
b822b4d
revamp packages
rauljordan Aug 28, 2024
3f8c330
all edits
rauljordan Aug 28, 2024
4de0e38
add in dockerfile
rauljordan Aug 28, 2024
92a701d
edit lock
rauljordan Aug 28, 2024
5f80180
edit
rauljordan Aug 28, 2024
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
62 changes: 7 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[workspace]
members = ["cgen", "check", "example", "main", "replay", "util"]
members = ["example", "main"]
resolver = "2"

[workspace.package]
authors = ["Offchain Labs"]
version = "0.4.2"
version = "0.5.0"
edition = "2021"
homepage = "https://arbitrum.io"
license = "MIT OR Apache-2.0"
Expand All @@ -31,7 +31,4 @@ lazy_static = "1.4.0"
libc = "0.2.148"
libloading = "0.8.0"
parking_lot = "0.12.1"
sneks = "0.1.2"

# members
cargo-stylus-util = { path = "util", version = "0.4.2" }
sneks = "0.1.2"
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM --platform=linux/amd64 rust:1.80 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
WORKDIR /cargo-stylus
RUN git checkout v0.5.0
RUN cargo build --release --manifest-path main/Cargo.toml
FROM --platform=linux/amd64 rust:1.80
COPY --from=builder /cargo-stylus/target/release/cargo-stylus /usr/local/bin/cargo-stylus
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ You should now have it available as a Cargo subcommand:
cargo stylus --help

Cargo command for developing Arbitrum Stylus projects

Usage:
cargo stylus new
cargo stylus export-abi
cargo stylus check
cargo stylus deploy
```

### Building the Project Locally
Expand Down Expand Up @@ -106,7 +100,7 @@ Location:
prover/src/binary.rs:493:9, data: None)
```

To read more about what counts as valid vs. invalid user WASM contracts, see [VALID_WASM](./check/VALID_WASM.md).
To read more about what counts as valid vs. invalid user WASM contracts, see [VALID_WASM](./main/VALID_WASM.md).

If your contract succeeds, you'll see the following message:

Expand All @@ -124,7 +118,7 @@ First, we can estimate the gas required to perform our deployment and activation
```
cargo stylus deploy \
--private-key-path=<PRIVKEY_FILE_PATH> \
--estimate-gas-only
--estimate-gas
```

and see:
Expand Down Expand Up @@ -222,7 +216,7 @@ Brotli-compressed, Stylus contract WASM binaries must fit within the **24Kb** [c

We recommend optimizing your Stylus contract's sizes to smaller sizes, but keep in mind the safety tradeoffs of using some of the more advanced optimizations. However, some small contracts when compiled to much smaller sizes can suffer performance penalties.

For a deep-dive into the different options for optimizing binary sizes using cargo stylus, see [OPTIMIZING_BINARIES.md](./check/OPTIMIZING_BINARIES.md).
For a deep-dive into the different options for optimizing binary sizes using cargo stylus, see [OPTIMIZING_BINARIES.md](./main/OPTIMIZING_BINARIES.md).

## License

Expand Down
18 changes: 0 additions & 18 deletions cgen/Cargo.toml

This file was deleted.

34 changes: 0 additions & 34 deletions cgen/src/main.rs

This file was deleted.

Loading
Loading