Skip to content

Commit 10086c5

Browse files
author
Jonas Bostoen
committed
feat: initial commit
0 parents  commit 10086c5

File tree

10 files changed

+244
-0
lines changed

10 files changed

+244
-0
lines changed

.github/.dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "cargo"
9+
labels:
10+
- "T: security"
11+
schedule:
12+
interval: "weekly"
13+
day: "monday"
14+
time: "07:00"

.github/workflows/lint.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- unstable
7+
- main
8+
pull_request:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
clippy:
15+
name: clippy
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 30
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: dtolnay/rust-toolchain@nightly
21+
with:
22+
components: clippy
23+
- uses: Swatinem/rust-cache@v2
24+
with:
25+
cache-on-failure: true
26+
- run: cargo clippy --lib --examples --tests --benches --all-features --locked
27+
env:
28+
RUSTFLAGS: -D warnings
29+
30+
fmt:
31+
name: fmt
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 30
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: dtolnay/rust-toolchain@nightly
37+
with:
38+
components: rustfmt
39+
- name: Run fmt
40+
run: cargo fmt --all --check

.github/workflows/unit.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit tests
2+
3+
on:
4+
push:
5+
branches:
6+
- unstable
7+
- main
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
17+
jobs:
18+
test:
19+
name: test workspace
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 30
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: dtolnay/rust-toolchain@master
25+
# Need to specify @master above to work with toolchain var
26+
with:
27+
toolchain: 1.83.0
28+
- uses: Swatinem/rust-cache@v2
29+
with:
30+
cache-on-failure: true
31+
- uses: taiki-e/install-action@nextest
32+
- name: Run tests
33+
run: cargo nextest run --retries 3 --no-tests=warn

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
.env

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
[package]
2+
name = "TODO"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "MIT"
6+
# rust-version = "1.83"
7+
exclude = [".github/"]
8+
repository = "TODO"
9+
10+
# Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021
11+
# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html
12+
resolver = "2"
13+
14+
[dependencies]
15+
16+
[lints]
17+
rust.missing_debug_implementations = "warn"
18+
rust.missing_docs = "warn"
19+
rust.rust_2018_idioms = { level = "deny", priority = -1 }
20+
rust.unreachable_pub = "warn"
21+
rust.unused_must_use = "deny"
22+
rustdoc.all = "warn"
23+
24+
[lints.clippy]
25+
# These are some of clippy's nursery (i.e., experimental) lints that we like.
26+
# By default, nursery lints are allowed. Some of the lints below have made good
27+
# suggestions which we fixed. The others didn't have any findings, so we can
28+
# assume they don't have that many false positives. Let's enable them to
29+
# prevent future problems.
30+
borrow_as_ptr = "warn"
31+
branches_sharing_code = "warn"
32+
clear_with_drain = "warn"
33+
cloned_instead_of_copied = "warn"
34+
collection_is_never_read = "warn"
35+
dbg_macro = "warn"
36+
derive_partial_eq_without_eq = "warn"
37+
doc_markdown = "warn"
38+
empty_line_after_doc_comments = "warn"
39+
empty_line_after_outer_attr = "warn"
40+
enum_glob_use = "warn"
41+
equatable_if_let = "warn"
42+
explicit_into_iter_loop = "warn"
43+
explicit_iter_loop = "warn"
44+
flat_map_option = "warn"
45+
from_iter_instead_of_collect = "warn"
46+
if_not_else = "warn"
47+
if_then_some_else_none = "warn"
48+
implicit_clone = "warn"
49+
imprecise_flops = "warn"
50+
iter_on_empty_collections = "warn"
51+
iter_on_single_items = "warn"
52+
iter_with_drain = "warn"
53+
iter_without_into_iter = "warn"
54+
large_stack_frames = "warn"
55+
manual_assert = "warn"
56+
manual_clamp = "warn"
57+
manual_is_variant_and = "warn"
58+
manual_string_new = "warn"
59+
match_same_arms = "warn"
60+
missing_const_for_fn = "warn"
61+
mutex_integer = "warn"
62+
naive_bytecount = "warn"
63+
needless_bitwise_bool = "warn"
64+
needless_continue = "warn"
65+
needless_for_each = "warn"
66+
needless_pass_by_ref_mut = "warn"
67+
nonstandard_macro_braces = "warn"
68+
option_as_ref_cloned = "warn"
69+
or_fun_call = "warn"
70+
path_buf_push_overwrite = "warn"
71+
read_zero_byte_vec = "warn"
72+
redundant_clone = "warn"
73+
redundant_else = "warn"
74+
single_char_pattern = "warn"
75+
string_lit_as_bytes = "warn"
76+
string_lit_chars_any = "warn"
77+
suboptimal_flops = "warn"
78+
suspicious_operation_groupings = "warn"
79+
trailing_empty_array = "warn"
80+
trait_duplication_in_bounds = "warn"
81+
transmute_undefined_repr = "warn"
82+
trivial_regex = "warn"
83+
tuple_array_conversions = "warn"
84+
type_repetition_in_bounds = "warn"
85+
uninhabited_references = "warn"
86+
unnecessary_self_imports = "warn"
87+
unnecessary_struct_initialization = "warn"
88+
unnested_or_patterns = "warn"
89+
unused_peekable = "warn"
90+
unused_rounding = "warn"
91+
use_self = "warn"
92+
useless_let_if_seq = "warn"
93+
while_float = "warn"
94+
zero_sized_map_values = "warn"
95+
96+
# These are nursery lints which have findings. Allow them for now. Some are not
97+
# quite mature enough for use in our codebase and some we don't really want.
98+
# Explicitly listing should make it easier to fix in the future.
99+
as_ptr_cast_mut = "allow"
100+
cognitive_complexity = "allow"
101+
debug_assert_with_mut_call = "allow"
102+
fallible_impl_from = "allow"
103+
future_not_send = "allow"
104+
needless_collect = "allow"
105+
non_send_fields_in_send_ty = "allow"
106+
redundant_pub_crate = "allow"
107+
significant_drop_in_scrutinee = "allow"
108+
significant_drop_tightening = "allow"
109+
too_long_first_doc_paragraph = "allow"

LICENSE

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 Chainbound
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.

rust-toolchain.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "stable"
3+
version = "1.83.0"

rustfmt.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
reorder_imports = true
2+
imports_granularity = "Crate"
3+
use_small_heuristics = "Max"
4+
comment_width = 100
5+
wrap_comments = true
6+
binop_separator = "Back"
7+
trailing_comma = "Vertical"
8+
trailing_semicolon = false
9+
use_field_init_shorthand = true
10+
format_code_in_doc_comments = true
11+
doc_comment_code_block_width = 100

src/main.rs

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

0 commit comments

Comments
 (0)