Skip to content

Commit 003ab51

Browse files
committed
setup commit
1 parent cac0b75 commit 003ab51

File tree

6 files changed

+132
-6
lines changed

6 files changed

+132
-6
lines changed

.github/workflows/rust.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
name: Build & Test
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install nightly toolchain
20+
uses: actions-rust-lang/setup-rust-toolchain@v1
21+
with:
22+
toolchain: nightly
23+
- name: Build
24+
run: cargo build --release --verbose
25+
- name: Run tests
26+
run: cargo test --release --verbose
27+
28+
cargo-clippy:
29+
runs-on: ubuntu-latest
30+
name: Clippy
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Install nightly toolchain
35+
uses: actions-rust-lang/setup-rust-toolchain@v1
36+
with:
37+
toolchain: nightly
38+
components: clippy
39+
- name: Clippy Check
40+
run: cargo clippy --workspace --all-targets -- -Dwarnings
41+
42+
cargo-fmt:
43+
name: Cargo fmt
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Install nightly toolchain
49+
uses: actions-rust-lang/setup-rust-toolchain@v1
50+
with:
51+
toolchain: nightly
52+
components: rustfmt
53+
- name: Rustfmt Check
54+
run: cargo fmt --all --check

.gitignore

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
# Generated by Cargo
22
# will have compiled files and executables
3-
debug
4-
target
3+
debug/
4+
target/
5+
6+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8+
Cargo.lock
59

610
# These are backup files generated by rustfmt
711
**/*.rs.bk
812

913
# MSVC Windows builds of rustc generate these, which store debugging information
1014
*.pdb
1115

12-
# Generated by cargo mutants
13-
# Contains mutation testing data
14-
**/mutants.out*/
15-
1616
# RustRover
1717
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
1818
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
1919
# and can be added to the global gitignore or merged into this file. For a more nuclear
2020
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
2121
#.idea/
22+
23+
# Added by cargo
24+
25+
/target
26+
27+
# Proptest data
28+
proptest-regressions/
29+
30+
# Profile data
31+
profile.json

Cargo.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[package]
2+
name = "leanSig"
3+
version = "0.1.0"
4+
edition = "2024"
5+
rust-version = "1.85"
6+
7+
[lints]
8+
rust.missing_debug_implementations = "warn"
9+
rust.unreachable_pub = "warn"
10+
rust.unused_must_use = "deny"
11+
rust.rust_2018_idioms = { level = "deny", priority = -1 }
12+
rust.dead_code = "allow"
13+
rustdoc.all = "warn"
14+
15+
[lints.clippy]
16+
# all lints that are on by default (correctness, suspicious, style, complexity, perf)
17+
all = { level = "warn", priority = -1 }
18+
19+
# new lints that are still under development
20+
nursery = { level = "warn", priority = -1 }
21+
# avoid lints that are too pedantic
22+
doc_markdown = "allow"
23+
24+
# lints which are rather strict or have occasional false positives
25+
pedantic = { level = "warn", priority = -1 }
26+
# avoid lints that are too pedantic
27+
cast_possible_truncation = "allow"
28+
cast_precision_loss = "allow"
29+
missing_errors_doc = "allow"
30+
missing_panics_doc = "allow"
31+
many_single_char_names = "allow"
32+
should_panic_without_expect = "allow"
33+
similar_names = "allow"
34+
suboptimal_flops = "allow"
35+
cast_sign_loss = "allow"
36+
37+
38+
[dependencies]
File renamed without changes.

LICENSE-MIT

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Ethereum Foundation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)