Skip to content

Commit c1c056a

Browse files
committed
root: Initial project
This is the initial commit for the project. It contains various project files meant to help me get new Rust projects off the ground. This includes configs for rustfmt and clippy, various markdown documents, licensing, CI, and a local config for cargo. Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
0 parents  commit c1c056a

19 files changed

Lines changed: 965 additions & 0 deletions

.cargo/config.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-FileCopyrightText: Copyright © 2025 hashcatHitman
2+
#
3+
# SPDX-License-Identifier: Apache-2.0 OR MIT
4+
5+
[build]
6+
rustflags = [
7+
"-Ctarget-cpu=native",
8+
# "-Clink-arg=-fuse-ld=mold",
9+
# "-Zthreads=8",
10+
# "-Zcrate-attr=feature(strict_provenance_lints,unqualified_local_imports)",
11+
]
12+
13+
[future-incompat-report]
14+
frequency = 'always'
15+
16+
[cargo-new]
17+
vcs = "git"
18+
19+
# [http]
20+
# ssl-version.min = "tlsv1.3"
21+
22+
[profile.release]
23+
codegen-units = 1
24+
strip = true
25+
opt-level = 3
26+
debug = false
27+
lto = true
28+
incremental = false
29+
30+
[profile.release.package."*"]
31+
codegen-units = 1
32+
strip = true
33+
opt-level = 3
34+
debug = false
35+
incremental = false
36+
37+
[profile.release.build-override]
38+
codegen-units = 1
39+
strip = true
40+
opt-level = 3
41+
debug = false
42+
incremental = false

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# SPDX-FileCopyrightText: Copyright © 2025 hashcatHitman
2+
#
3+
# SPDX-License-Identifier: Apache-2.0 OR MIT
4+
5+
name: CI
6+
7+
on:
8+
push:
9+
branches: ["main"]
10+
pull_request:
11+
branches: ["**"]
12+
workflow_dispatch: {}
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
MSRV: 1.89.0
17+
18+
jobs:
19+
quality-control:
20+
name: Quality Control
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v5
24+
- name: Nightly Install
25+
run: rustup toolchain add nightly && rustup component add --toolchain nightly rustfmt clippy
26+
- name: Format Check (Nightly)
27+
run: cargo +nightly fmt --verbose --all --check
28+
- name: Clippy (Nightly)
29+
run: cargo +nightly clippy --locked --workspace --all-targets --all-features -- -D warnings -Zcrate-attr=feature"(strict_provenance_lints,unqualified_local_imports)"
30+
31+
build-test-msrv:
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
os: [ubuntu-latest, windows-latest, macos-latest]
36+
37+
name: Build & Test (${{ matrix.os }}) (MSRV)
38+
runs-on: ${{ matrix.os }}
39+
40+
steps:
41+
- uses: actions/checkout@v5
42+
- name: MSRV Install
43+
run: rustup toolchain add ${{ env.MSRV }}
44+
- name: Build
45+
run: cargo +${{ env.MSRV }} build --verbose --workspace --all-targets --all-features --locked
46+
- name: Tests
47+
run: cargo +${{ env.MSRV }} test --verbose --workspace --all-targets --all-features --locked
48+
- name: Doctests
49+
run: cargo +${{ env.MSRV }} test --verbose --workspace --doc --all-features --locked
50+
51+
build-test-nightly:
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
os: [ubuntu-latest, windows-latest, macos-latest]
56+
57+
name: Build & Test (${{ matrix.os }}) (Nightly)
58+
runs-on: ${{ matrix.os }}
59+
60+
steps:
61+
- uses: actions/checkout@v5
62+
- name: Build
63+
run: cargo +nightly build --verbose --workspace --all-targets --all-features --locked
64+
- name: Tests
65+
run: cargo +nightly test --verbose --workspace --all-targets --all-features --locked
66+
- name: Doctests
67+
run: cargo +nightly test --verbose --workspace --doc --all-features --locked

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright © 2025 hashcatHitman
2+
#
3+
# SPDX-License-Identifier: Apache-2.0 OR MIT
4+
5+
/target
6+
/.cargo
7+
/.venv

CONTRIBUTING.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright © 2025 hashcatHitman
3+
4+
SPDX-License-Identifier: Apache-2.0 OR MIT
5+
-->
6+
7+
# Contribution Guidelines
8+
9+
Thanks for your interest in contributing to the project! These guidelines are
10+
meant to help you contribute effectively, and you are encouraged to read and
11+
follow them!
12+
13+
## AI Policy
14+
15+
This project is made by humans for humans. All use of artificial intelligence
16+
(AI), large-language models (LLMs), or similar techniques is forbidden. This
17+
includes but is not limited to the use of "ChatGPT", "Copilot", "Claude", and
18+
other models.
19+
20+
This applies to **all** contributions. This includes but is not limited to issue
21+
reports, security reports, feature requests, pull requests, translations, commit
22+
messages, comments, audio, videos, images, and ideas. A poorly-made logo made by
23+
an amateur/non artist is preferable to an AI-generated image 100% of the time.
24+
25+
If you are physically impaired and use these tools to assist with the reading
26+
and/or writing of contributions, you should take steps to ensure that no part of
27+
your contributions are changed from your original thoughts. Traditional screen
28+
readers and Text-To-Speech (TTS) tools will likely provide better assurance of
29+
this.
30+
31+
If you don't understand something, please ask others to explain it to you and/or
32+
research it by hand. A good place to start would be the "Discussions" tab.
33+
34+
I can't really forbid the use of the contents of this repository in the training
35+
of AI/LLMs, as that currently isn't compatible with being "open source". That
36+
said:
37+
38+
**Pretty please don't train AI on this project or the surrounding discussions
39+
(issues, pull requests, comments, etc).**
40+
41+
## Reporting Issues and Requesting Features
42+
43+
To report issues or request features, use the "Issues" tab. Do NOT report
44+
security issues there - please see [our Security Policy] for that instead.
45+
46+
## Commits
47+
48+
### Atomicity
49+
50+
It is preferred that individual commits are atomic; they should be small and
51+
each individual commit should be capable of passing CI (and ideally, actually
52+
work - at least as well as it did beforehand). This is not a strict requirement
53+
for commits that are part of a pull request, but the pull request as a whole
54+
must pass CI and should, ideally, break nothing.
55+
56+
### Linear History and Rebasing
57+
58+
This repository enforces linear commit history. Please ensure your development
59+
branch is up to date before attempting to make any changes, and rebase onto main
60+
before pushing commits.
61+
62+
### Commit Signing
63+
64+
This repository enforces and commit signing. You should have a signing key
65+
configured for your account - SSH is preferred. You can learn more about how to
66+
do that in the [GitHub docs].
67+
68+
### Commit Messages
69+
70+
It is good practice to follow the 50/72 rule for commit messages. The first line
71+
should be 50 characters, and the following description 72 characters per line.
72+
73+
If you need to use more than 50 characters on the first line, don't lose your
74+
mind trying to make 50 characters work. Just try to keep it reasonable.
75+
76+
If you're familiar with [Conventional Commits], the suggestions made there are
77+
typically welcome as well.
78+
79+
An example commit message might look like:
80+
81+
```text
82+
fix: removed needless panic
83+
84+
For some reason there was a `panic!()` hidden in one of the builders
85+
that was causing crashes. That's gone now.
86+
```
87+
88+
Above all else, your commit message should be descriptive and explain what has
89+
changed.
90+
91+
## Rust Version
92+
93+
This project uses some lints that require the Nightly toolchain. You are
94+
encouraged to use Nightly for development, but keep in mind the project is
95+
expected to pass CI on MSRV. The lints have been configured such that you will
96+
get warnings for `unknown_lints` on MSRV, but should still be able to build
97+
and test fine.
98+
99+
If you are developing on Nightly, you should create `./.cargo/config.toml` and
100+
include at least the following:
101+
102+
```toml
103+
[build]
104+
rustflags = [
105+
"-Zcrate-attr=feature(strict_provenance_lints,unqualified_local_imports)",
106+
]
107+
```
108+
109+
This enables the features needed for the Nightly-only lints.
110+
111+
## Licensing
112+
113+
<!-- Adapted from Arti's README -->
114+
115+
This code is licensed under either of
116+
117+
- Apache License, Version 2.0
118+
- MIT license
119+
120+
at your option.
121+
122+
Unless you explicitly state otherwise, any contribution intentionally submitted
123+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
124+
dual licensed as above, without any additional terms or conditions.
125+
126+
Additionally, this project attempts to be compliant with [version 3.3 of the
127+
REUSE Specification]. Please make sure it stays that way!
128+
129+
[our Security Policy]: ./SECURITY.md
130+
[GitHub docs]: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification
131+
[Conventional Commits]: https://www.conventionalcommits.org
132+
[version 3.3 of the REUSE Specification]: https://reuse.software/spec-3.3/

COPYRIGHT.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright © 2025 hashcatHitman
3+
4+
SPDX-License-Identifier: Apache-2.0 OR MIT
5+
-->
6+
7+
# Copyright
8+
9+
Copyright © `2025` `hashcatHitman`
10+
11+
## License
12+
13+
Except as otherwise noted, this project is is licensed under the
14+
[Apache License, Version 2.0] or the [MIT license], at your option.
15+
16+
[Apache License, Version 2.0]: LICENSE-APACHE "If this link fails, see <http://www.apache.org/licenses/LICENSE-2.0>"
17+
[MIT license]: LICENSE-MIT "If this link fails, see <http://opensource.org/licenses/MIT>"

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.

0 commit comments

Comments
 (0)