Skip to content

Commit

Permalink
rewrote & applied pre-commit conf, fixed cargo, deleted temp. files
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrwnaguib committed Nov 17, 2024
1 parent 61872a5 commit 79bea8f
Show file tree
Hide file tree
Showing 12 changed files with 271 additions and 442 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/test-coverage.yaml

This file was deleted.

47 changes: 15 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
repos:
- repo: local
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: commit-msg
name: commit lint
entry: commitlint --edit
language: system
stages: [commit-msg]

- id: cargo-fmt
name: cargo format
entry: cargo fmt
language: rust
args: ["--", "--check"]
types: [rust]
stages: [pre-commit]

- id: cargo-clippy
name: cargo clippy
description: Lint rust sources
entry: cargo clippy
language: rust
args: ["--", "-D", "warnings"]
types: [rust]
pass_filenames: false
stages: [pre-commit]

- id: check-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/doublify/pre-commit-rust
rev: master
hooks:
- id: fmt
- id: clippy
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: cargo check
language: rust
types: [rust]
pass_filenames: false
stages: [pre-commit]
39 changes: 1 addition & 38 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,13 @@
cargo-features = ["edition2024"]

[package]
name = "zk-auctions"
version = "0.1.0"

[dependencies]
zk-auctions-methods = { path = "methods" }
risc0-zkvm = "v1.1.3"
risc0-zkvm = "1.1.3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[features]
cuda = ["risc0-zkvm/cuda"]
default = []
prove = ["risc0-zkvm/prove"]

[workspace]

resolver = "2"

members = [
"methods",
]

# Dev / testing mode. We make opt-level = 3 to improve proving times (otherwise it is really slow)
opt-level = 3
debug = 1 # change to 0 or 2 for more or less debug info
overflow-checks = true # default
incremental = true # default

# Local "release" mode, more optimized than dev but faster to compile than release
[profile.local]
inherits = "dev"
opt-level = 3
# Set this to 1 or 2 to get more useful backtraces
debug = 1
debug-assertions = false
panic = 'unwind'
# better recompile times
incremental = true
lto = "thin"
codegen-units = 16

[profile.release]
opt-level = 3
debug = false
debug-assertions = false
lto = "fat"
panic = "abort"
incremental = false
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository is intended to provide a playground for you to easily start writ

## Installation
### Prerequisites
This projects requires [Rust](https://www.rust-lang.org/), if you don't have Rust and [rustup](https://rustup.rs/) installed, start by [installing Rust and rustup](https://doc.rust-lang.org/cargo/getting-started/installation.html). Risc0 mainly depends on the [rustup](https://rustup.rs/) tool.
This projects requires [Rust](https://www.rust-lang.org/), if you don't have Rust and [rustup](https://rustup.rs/) installed, start by [installing Rust and rustup](https://doc.rust-lang.org/cargo/getting-started/installation.html). Risc0 mainly depends on the [rustup](https://rustup.rs/) tool.

### Installation of `rzup`
> This installation guide if for both x86-64 Linux and arm64 mac0S.
Expand All @@ -24,8 +24,8 @@ rzup install
Please checkout [Ric0 installation docs](https://dev.risczero.com/api/zkvm/install) for more details.

### Institution of Devtools (optional - only if you are a contributor)
- Installing commitlint tools globally via NPM for the pre-commit tool
- Installing commitlint tools globally via NPM for the pre-commit tool

```bash
npm install -g @commitlint/cli @commitlint/config-conventional
```
```
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
};
Loading

0 comments on commit 79bea8f

Please sign in to comment.