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

feat: Optionally minimize produced RISC-V binary size #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ members = [
resolver = "2"

[workspace.dependencies]
alloy-sol-types = "0.7.7"
alloy-sol-types = "0.7.7"

## Uncomment to minimize the size of produced RISC-V binary
#[profile.release]
#lto = "fat"
#opt-level = "s"
#strip = "symbols"
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ cd program
cargo prove build
```

The produced binary can be found in `target/elf-compilation/riscv32im-succinct-zkvm-elf/release`.
To reduce the size of the binary, uncomment the following lines in `Cargo.toml` (in the project root):

```toml
[profile.release]
lto = "fat"
opt-level = "s"
strip = "symbols"
```

### Execute the Program

To run the program without generating a proof:
Expand Down