Skip to content

Commit 4747cf0

Browse files
committed
🔨 chore(rust-template): initial commit
Signed-off-by: Pauline <[email protected]>
0 parents  commit 4747cf0

17 files changed

+669
-0
lines changed

Diff for: ‎.cargo/config.toml

Whitespace-only changes.

Diff for: ‎.editorconfig

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# https://EditorConfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = tab
6+
indent_size = 4
7+
end_of_line = lf
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
12+
[*.nix]
13+
indent_style = space
14+
indent_size = 2
15+
16+
# Rust
17+
# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
18+
[*.rs]
19+
insert_final_newline = false
20+
21+
# yaml is the worst language in the world
22+
[*.{yaml,yml}]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[{.*,*.md,*.toml,*.yml,*.yaml}]
27+
indent_style = space

Diff for: ‎.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @pauliesnug

Diff for: ‎.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ko_fi: pauliesnug

Diff for: ‎.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "11:00"
8+
open-pull-requests-limit: 10
9+
- package-ecosystem: github-actions
10+
directory: "/"
11+
schedule:
12+
interval: weekly
13+
time: "11:00"
14+
open-pull-requests-limit: 10

Diff for: ‎.github/pull_request_template.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Put any information about this PR up here -->
2+
3+
<!-- Which issue does this PR close? -->
4+
<!-- If this PR does not have a corresponding issue,
5+
make sure one gets created before you create this PR.
6+
You can create a bug report or feature request at
7+
https://github.com/pulseflow/rust-template/issues/new/choose -->
8+
9+
Closes #(issue)

Diff for: ‎.gitignore

+220
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/c,c++,rust,cmake,linux,macos,windows,rust-analyzer,visualstudiocode,archlinuxpackages
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=c,c++,rust,cmake,linux,macos,windows,rust-analyzer,visualstudiocode,archlinuxpackages
3+
4+
### ArchLinuxPackages ###
5+
*.tar
6+
*.tar.*
7+
*.jar
8+
*.exe
9+
*.msi
10+
*.zip
11+
*.tgz
12+
*.log
13+
*.log.*
14+
*.sig
15+
16+
pkg/
17+
src/
18+
19+
### C ###
20+
# Prerequisites
21+
*.d
22+
23+
# Object files
24+
*.o
25+
*.ko
26+
*.obj
27+
*.elf
28+
29+
# Linker output
30+
*.ilk
31+
*.map
32+
*.exp
33+
34+
# Precompiled Headers
35+
*.gch
36+
*.pch
37+
38+
# Libraries
39+
*.lib
40+
*.a
41+
*.la
42+
*.lo
43+
44+
# Shared objects (inc. Windows DLLs)
45+
*.dll
46+
*.so
47+
*.so.*
48+
*.dylib
49+
50+
# Executables
51+
*.out
52+
*.app
53+
*.i*86
54+
*.x86_64
55+
*.hex
56+
57+
# Debug files
58+
*.dSYM/
59+
*.su
60+
*.idb
61+
*.pdb
62+
63+
# Kernel Module Compile Results
64+
*.mod*
65+
*.cmd
66+
.tmp_versions/
67+
modules.order
68+
Module.symvers
69+
Mkfile.old
70+
dkms.conf
71+
72+
### C++ ###
73+
# Prerequisites
74+
75+
# Compiled Object files
76+
*.slo
77+
78+
# Precompiled Headers
79+
80+
# Compiled Dynamic libraries
81+
82+
# Fortran module files
83+
*.mod
84+
*.smod
85+
86+
# Compiled Static libraries
87+
*.lai
88+
89+
# Executables
90+
91+
### CMake ###
92+
CMakeLists.txt.user
93+
CMakeCache.txt
94+
CMakeFiles
95+
CMakeScripts
96+
Testing
97+
Makefile
98+
cmake_install.cmake
99+
install_manifest.txt
100+
compile_commands.json
101+
CTestTestfile.cmake
102+
_deps
103+
104+
### CMake Patch ###
105+
# External projects
106+
*-prefix/
107+
108+
### Linux ###
109+
*~
110+
111+
# temporary files which can be created if a process still has a handle open of a deleted file
112+
.fuse_hidden*
113+
114+
# KDE directory preferences
115+
.directory
116+
117+
# Linux trash folder which might appear on any partition or disk
118+
.Trash-*
119+
120+
# .nfs files are created when an open file is removed but is still being accessed
121+
.nfs*
122+
123+
### macOS ###
124+
# General
125+
.DS_Store
126+
.AppleDouble
127+
.LSOverride
128+
129+
# Icon must end with two \r
130+
Icon
131+
132+
133+
# Thumbnails
134+
._*
135+
136+
# Files that might appear in the root of a volume
137+
.DocumentRevisions-V100
138+
.fseventsd
139+
.Spotlight-V100
140+
.TemporaryItems
141+
.Trashes
142+
.VolumeIcon.icns
143+
.com.apple.timemachine.donotpresent
144+
145+
# Directories potentially created on remote AFP share
146+
.AppleDB
147+
.AppleDesktop
148+
Network Trash Folder
149+
Temporary Items
150+
.apdisk
151+
152+
### macOS Patch ###
153+
# iCloud generated files
154+
*.icloud
155+
156+
### Rust ###
157+
# Generated by Cargo
158+
# will have compiled files and executables
159+
debug/
160+
target/
161+
162+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
163+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
164+
Cargo.lock
165+
166+
# These are backup files generated by rustfmt
167+
**/*.rs.bk
168+
169+
# MSVC Windows builds of rustc generate these, which store debugging information
170+
171+
### rust-analyzer ###
172+
# Can be generated by other build systems other than cargo (ex: bazelbuild/rust_rules)
173+
rust-project.json
174+
175+
176+
### VisualStudioCode ###
177+
.vscode/*
178+
!.vscode/settings.json
179+
!.vscode/tasks.json
180+
!.vscode/launch.json
181+
!.vscode/extensions.json
182+
!.vscode/*.code-snippets
183+
184+
# Local History for Visual Studio Code
185+
.history/
186+
187+
# Built Visual Studio Code Extensions
188+
*.vsix
189+
190+
### VisualStudioCode Patch ###
191+
# Ignore all local history of files
192+
.history
193+
.ionide
194+
195+
### Windows ###
196+
# Windows thumbnail cache files
197+
Thumbs.db
198+
Thumbs.db:encryptable
199+
ehthumbs.db
200+
ehthumbs_vista.db
201+
202+
# Dump file
203+
*.stackdump
204+
205+
# Folder config file
206+
[Dd]esktop.ini
207+
208+
# Recycle Bin used on file shares
209+
$RECYCLE.BIN/
210+
211+
# Windows Installer files
212+
*.cab
213+
*.msix
214+
*.msm
215+
*.msp
216+
217+
# Windows shortcuts
218+
*.lnk
219+
220+
# End of https://www.toptal.com/developers/gitignore/api/c,c++,rust,cmake,linux,macos,windows,rust-analyzer,visualstudiocode,archlinuxpackages

Diff for: ‎.rustfmt.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
max_width = 100
2+
hard_tabs = true
3+
newline_style = "Unix"
4+
use_small_heuristics = "Default"
5+
reorder_imports = true
6+
imports_granularity = "Module"
7+
reorder_modules = true
8+
remove_nested_parens = true
9+
edition = "2024"
10+
merge_derives = true
11+
use_try_shorthand = false
12+
use_field_init_shorthand = false
13+
force_explicit_abi = true
14+
unstable_features = true

Diff for: ‎Cargo.toml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[workspace]
2+
resolver = "2"
3+
members = ["crates/*"]
4+
5+
[workspace.package]
6+
authors = ["pauliesnug"]
7+
edition = "2024"
8+
homepage = "https://github.com/pulseflow/rust-template"
9+
repository = "https://github.com/pulseflow/rust-template"
10+
readme = "./README.md"
11+
license = "LicenseRef-OQL-1.2 OR MIT OR Apache-2.0"
12+
version = "0.1.0"
13+
14+
[workspace.lints.clippy]
15+
all = { level = "warn", priority = -1 }
16+
pedantic = { level = "warn", priority = -1 }
17+
correctness = { level = "warn", priority = -1 }
18+
perf = { level = "warn", priority = -1 }
19+
style = { level = "warn", priority = -1 }
20+
suspicious = { level = "warn", priority = -1 }
21+
complexity = { level = "warn", priority = -1 }
22+
nursery = { level = "warn", priority = -1 }
23+
unnecessary_cast = "warn"
24+
cast_lossless = "warn"
25+
cast_possible_truncation = "warn"
26+
cast_possible_wrap = "warn"
27+
cast_sign_loss = "warn"
28+
dbg_macro = "warn"
29+
deprecated_cfg_attr = "warn"
30+
separated_literal_suffix = "warn"
31+
missing_errors_doc = "allow"
32+
future_not_send = "allow"
33+
module_name_repetitions = "allow"
34+
struct_field_names = "allow"
35+
cast_precision_loss = "allow"
36+
missing_panics_doc = "allow"
37+
38+
[workspace.lints.rust]
39+
unused_qualifications = "warn"
40+
rust_2018_idioms = { level = "warn", priority = -1 }
41+
trivial_casts = "warn"
42+
trivial_numeric_casts = "warn"
43+
unused_allocation = "warn"
44+
unused_import_braces = "warn"
45+
deprecated = "warn"
46+
deprecated_in_future = "forbid"
47+
unused_must_use = "deny"
48+
49+
[workspace.dependencies]
50+
tokio = { version = "1.41", features = ["full"] }
51+
serde = { version = "1.0", features = ["derive"] }
52+
chrono = { version = "0.4", features = ["serde"] }
53+
reqwest = { version = "0.12", features = ["stream", "json", "rustls-tls-native-roots"] }
54+
indexmap = { version = "2.6", features = ["serde"] }
55+
eyre = "0.6"
56+
color-eyre = { version = "0.6", default-features = false }
57+
bytes = "1.9"
58+
thiserror = "2.0"
59+
futures = "0.3.31"
60+
serde_json = "1.0"
61+
lazy_static = "1.5"
62+
dotenvy = "0.15"

0 commit comments

Comments
 (0)