zkmopro / mopro

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

Fix mopro build cache error #90

Closed oskarth closed 5 months ago

oskarth commented 9 months ago

Problem

When creating multiple projects sometimes mopro-core doesn't use the correct path:

➜  mopro-cli-example pwd
/tmp/bar/mopro-cli-example
➜  mopro-cli-example mopro build
Building project for platform desktop: circom with config mopro-config.toml
Using build configuration file: /tmp/bar/mopro-cli-example/mopro-config.toml
warning: mopro-core@0.1.0: Config: /tmp/quux/mopro-cli-example/mopro-config.toml
warning: mopro-core@0.1.0: Circuit directory: /tmp/quux/mopro-cli-example/circuits/multiplier2
warning: mopro-core@0.1.0: zkey_file: /tmp/quux/mopro-cli-example/circuits/multiplier2/target/multiplier2_final.zkey
warning: mopro-core@0.1.0: wasm_file: /tmp/quux/mopro-cli-example/circuits/multiplier2/target/multiplier2_js/multiplier2.wasm
warning: mopro-core@0.1.0: arkzkey_file: /tmp/quux/mopro-cli-example/circuits/multiplier2/target/multiplier2_final.arkzkey
warning: mopro-core@0.1.0: Dylib usage is disabled in the config.
    Finished release [optimized] target(s) in 0.23s

It should change when config file changes but doesn't appear to always be the case https://github.com/oskarth/mopro/commit/ce48f44dcb2e93f20fa678940e04d67564fcf71c

oskarth commented 9 months ago

One thing that'd help with this is mopro clean wrapping cargo clean. For now recommendation is to do cargo clean in mopro-core.

Related https://github.com/oskarth/mopro/issues/73