Skip to content

no_std support

no_std support #109

Workflow file for this run

name: Rust CI
on:
push:
branches: [main]
pull_request:
branches: "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Run tests
run: cargo test --verbose
verify-proof:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
layout:
[
"dex",
"recursive",
"recursive_with_poseidon",
"small",
"starknet",
"starknet_with_keccak",
]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Run verification
run: cargo run --release --bin swiftness --features std,${{ matrix.layout }},keccak --no-default-features -- --proof examples/proofs/${{ matrix.layout }}/cairo0_example_proof.json
# no-std-build:
# name: Test no_std support
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# layout:
# [
# "dex",
# "recursive",
# "recursive_with_poseidon",
# "small",
# "starknet",
# "starknet_with_keccak",
# ]
# steps:
# - uses: actions/checkout@v3
# - name: Check wasm compatibility
# run: |-
# cd examples/no_std_build
# rustup show
# cargo build -r --features ${{ matrix.layout }},keccak --no-default-features