-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add newlines, seperate build and prepare script, update readme
- Loading branch information
1 parent
6e4f553
commit 018bb1e
Showing
7 changed files
with
72 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
name: Rust | ||
|
||
on: | ||
[push, pull_request] | ||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install circom | ||
run: | | ||
git clone https://github.com/iden3/circom.git | ||
cd circom | ||
cargo build --release | ||
cargo install --path circom | ||
- name: Build | ||
run: ./scripts/build_ios.sh simulator debug | ||
- name: Run core tests | ||
run: cd mopro-core/ && cargo test --verbose | ||
- name: Run ffi tests | ||
run: cd mopro-ffi/ && cargo test --verbose | ||
- name: Run bindings tests | ||
run: cd mopro-ffi/ && cargo test --test test_generated_bindings | ||
- uses: actions/checkout@v3 | ||
- name: Install circom | ||
run: | | ||
git clone https://github.com/iden3/circom.git | ||
cd circom | ||
cargo build --release | ||
cargo install --path circom | ||
- name: Prepare | ||
run: ./scripts/prepare.sh | ||
- name: Build | ||
run: ./scripts/build_ios.sh simulator debug | ||
- name: Run core tests | ||
run: cd mopro-core/ && cargo test --verbose | ||
- name: Run ffi tests | ||
run: cd mopro-ffi/ && cargo test --verbose | ||
- name: Run bindings tests | ||
run: cd mopro-ffi/ && cargo test --test test_generated_bindings |
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,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
circom ./examples/circom/multiplier2.circom --r1cs --wasm --sym --output ./examples/circom/target | ||
circom ./examples/circom/multiplier2.circom --r1cs --wasm --sym --output ./examples/circom/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
|
||
mkdir target | ||
circom ./keccak256_256_test.circom --r1cs --wasm --sym --output ./target | ||
mkdir -p target | ||
circom ./keccak256_256_test.circom --r1cs --wasm --sym --output ./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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
# mopro-ios | ||
|
||
## Prepare | ||
|
||
<!--TODO: If the monorepo is seperated, update this--> | ||
|
||
Check the [Prepare](../README.md#prepare) and [Build Bindings](../README.md#build-bindings) steps in the root directory. | ||
|
||
## Execute | ||
|
||
Open the `MoproKit/Example/MoproKit.xcworkspace` in Xcode. | ||
Use `command`+`R` to execute a simulator. | ||
|
||
## Linker problems? | ||
|
||
- Open Xcworkspace | ||
- Pod > MoproKit target | ||
- Build Settings | ||
- Library Search Paths | ||
- Other Linker Flags | ||
- Header search paths | ||
- (Build Phases > Link Binary With Libraries `lmopro_ffi` (no lib no .a)) | ||
- Gitignore | ||
Add the following settings after | ||
|
||
1. `MoproKit/Example/Pods/Target Support Files/MoproKit/MoproKit.debug.xcconfig` | ||
2. `MoproKit/Example/Pods/Target Support Files/MoproKit/MoproKit.release.xcconfig` | ||
|
||
files | ||
|
||
``` | ||
LIBRARY_SEARCH_PATHS=${SRCROOT}/../../Libs | ||
OTHER_LDFLAGS=-lmopro_ffi | ||
USER_HEADER_SEARCH_PATHS=${SRCROOT}/../../include | ||
``` |
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,13 @@ | ||
#!/bin/bash | ||
|
||
PROJECT_DIR=$(pwd) | ||
|
||
# build circom circuits in mopro-core | ||
cd ${PROJECT_DIR}/mopro-core/examples/circom/keccak256 | ||
npm install | ||
./compile.sh | ||
|
||
# build ffi in mopro-ffi | ||
cd ${PROJECT_DIR}/mopro-ffi | ||
rustup target add x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim | ||
cargo install --bin uniffi-bindgen --path . |