Skip to content

Commit ee87a30

Browse files
authored
feat: frontend (#11)
1 parent 8e7eb83 commit ee87a30

File tree

161 files changed

+25753
-25131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+25753
-25131
lines changed

.github/workflows/check.yaml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Install Nargo
15+
uses: noir-lang/[email protected]
16+
with:
17+
toolchain: v1.0.0-beta.2
18+
- uses: actions/checkout@v4
19+
- name: Install Rust
20+
uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: nightly
23+
- name: Run tests
24+
run: |
25+
nargo compile --workspace
26+
cargo test --all
27+
28+
format:
29+
name: Format
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install Rust
34+
uses: dtolnay/rust-toolchain@master
35+
with:
36+
toolchain: nightly
37+
components: rustfmt
38+
- name: Check formatting
39+
run: cargo fmt --all -- --check
40+
- name: Install taplo
41+
uses: taiki-e/install-action@cargo-binstall
42+
- name: Install tools
43+
run: cargo binstall --no-confirm taplo-cli
44+
- name: Check TOML formatting
45+
run: taplo fmt --check
46+
47+
lint:
48+
name: Lint
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
- name: Install Rust
53+
uses: dtolnay/rust-toolchain@master
54+
with:
55+
toolchain: nightly
56+
components: clippy
57+
- name: Run clippy
58+
run: cargo clippy --all
59+
60+
deps:
61+
name: Dependencies
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Install Rust
66+
uses: dtolnay/rust-toolchain@master
67+
with:
68+
toolchain: nightly
69+
- name: Install cargo-binstall
70+
uses: taiki-e/install-action@cargo-binstall
71+
- name: Install tools
72+
run: cargo binstall --no-confirm cargo-udeps
73+
- name: Check unused dependencies
74+
run: cargo udeps

.rustfmt.toml

+43-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,46 @@
1-
imports_granularity = "Crate"
2-
group_imports = "StdExternalCrate"
1+
# Rustfmt configuration
2+
# Opinionated whitespace and tabs. The most important of these are imports and width settings.
3+
# Others may want to borrow or change these to their own liking.
4+
# https://rust-lang.github.io/rustfmt
35

4-
format_code_in_doc_comments = true
6+
# version-related
7+
unstable_features=true
8+
use_try_shorthand=true # replace any `try!` (2015 Rust) with `?`
59

6-
use_field_init_shorthand = true
10+
# misc formatting
11+
condense_wildcard_suffixes =true # replace: (a,b,_,_)=(1, 2, 3, 4); -> (a,b,..)=(1, 2, 3, 4);
12+
format_code_in_doc_comments =true # format code blocks in doc comments
13+
format_macro_matchers =true # $a: ident -> $a:ident
14+
format_strings =true # break and insert newlines for long string literals
15+
match_block_trailing_comma =true # include comma in match blocks after '}'
16+
normalize_comments =true # convert /*..*/ to //.. where possible
17+
reorder_impl_items =true # move `type` and `const` declarations to top of impl block
18+
struct_field_align_threshold=20 # align struct arguments' types vertically
19+
use_field_init_shorthand =true # struct initialization short {x: x} -> {x}
720

8-
wrap_comments = true
9-
normalize_comments = true
10-
comment_width = 80
11-
edition = "2021"
21+
# reduce whitespace
22+
blank_lines_upper_bound=1 # default: 1. Sometimes useful to change to 0 to condense a file.
23+
brace_style ="PreferSameLine" # prefer starting `{` without inserting extra \n
24+
fn_single_line =true # if it's a short 1-liner, let it be a short 1-liner
25+
match_arm_blocks =false # remove unnecessary {} in match arms
26+
newline_style ="Unix" # not auto, we won the culture war. \n over \r\n
27+
overflow_delimited_expr=true # prefer ]); to ]\n);
28+
where_single_line =true # put where on a single line if possible
29+
30+
# imports preferences
31+
group_imports ="StdExternalCrate" # create import groupings for std, external libs, and internal deps
32+
imports_granularity="Crate" # aggressively group imports
33+
34+
# width settings: everything to 100
35+
comment_width =100 # default: 80
36+
inline_attribute_width=60 # inlines #[cfg(test)]\nmod test -> #[cfg(test)] mod test
37+
max_width =100 # default: 100
38+
use_small_heuristics ="Max" # don't ever newline short of `max_width`.
39+
wrap_comments =true # wrap comments at `comment_width`
40+
# format_strings = true # wrap strings at `max_length`
41+
42+
# tabs and spaces
43+
hard_tabs =false # (def: false) use spaces over tabs
44+
tab_spaces=2 # 2 > 4, it's just math.
45+
46+
ignore=["tls"]

0 commit comments

Comments
 (0)