zkmopro / mopro

Making client-side proving on mobile simple.
https://zkmopro.org
Apache License 2.0
131 stars 35 forks source link

Fix error[E0601]: `main` function not found in crate `generate_benchmark_report` #61

Closed oskarth closed 10 months ago

oskarth commented 10 months ago

When running ./scripts/build_ios.sh simulator release it is unable to compile mopro-core due to:

warning: zkey_file: /Users/user/repos/github.com/oskarth/mopro/mopro-core/examples/circom/keccak256/target/keccak256_256_test_final.zkey
warning: wasm_file: /Users/user/repos/github.com/oskarth/mopro/mopro-core/examples/circom/keccak256/target/keccak256_256_test_js/keccak256_256_test.wasm
warning: arkzkey_file: /Users/user/repos/github.com/oskarth/mopro/mopro-core/examples/circom/keccak256/target/keccak256_256_test_final.arkzkey
   Compiling mopro-core v0.1.0 (/Users/user/repos/github.com/oskarth/mopro/mopro-core)
error[E0601]: `main` function not found in crate `generate_benchmark_report`
  --> src/middleware/gpu_explorations/bin/generate_benchmark_report.rs:34:2
   |
34 | }
   |  ^ consider adding a `main` function to `src/middleware/gpu_explorations/bin/generate_benchmark_report.rs`

For more information about this error, try `rustc --explain E0601`.
The following warnings were emitted during compilation:

warning: zkey_file: /Users/user/repos/github.com/oskarth/mopro/mopro-core/examples/circom/keccak256/target/keccak256_256_test_final.zkey
warning: wasm_file: /Users/user/repos/github.com/oskarth/mopro/mopro-core/examples/circom/keccak256/target/keccak256_256_test_js/keccak256_256_test.wasm
warning: arkzkey_file: /Users/user/repos/github.com/oskarth/mopro/mopro-core/examples/circom/keccak256/target/keccak256_256_test_final.arkzkey

error: could not compile `mopro-core` (bin "generate_benchmark_report") due to previous error

@FoodChain1028 or @moven0831 would you mind fixing this? src/middleware/gpu_explorations/bin/generate_benchmark_report.rs:34:2 think this was introduced in previous PR. Whatever way gets rid of the errror works.

moven0831 commented 10 months ago

@oskarth I submitted a PR to fix this by adding a trivial main function when the gpu-benchmarks feature is not enable.

oskarth commented 10 months ago

Above PR closes this