-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitignore
More file actions
198 lines (161 loc) · 5.92 KB
/
.gitignore
File metadata and controls
198 lines (161 loc) · 5.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# ============================================================================
# Rust Crate .gitignore - markdown-ai-cite-remove
# ============================================================================
# This gitignore follows Rust community best practices for library crates
# that will be published to crates.io
# ============================================================================
# -----------------------------------------------------------------------------
# CARGO BUILD ARTIFACTS (REQUIRED)
# -----------------------------------------------------------------------------
# The /target directory contains all compiled artifacts and should NEVER
# be committed. Cargo will recreate this on every build.
/target/
# Cargo.lock is intentionally EXCLUDED from .gitignore for library crates
# Rationale: Libraries should NOT commit Cargo.lock (only binaries should)
# See: https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
# Since this is a library crate, Cargo.lock should be in .gitignore:
Cargo.lock
# Note: If you add a CLI binary (bin/cli.rs), consider removing Cargo.lock
# from gitignore to ensure reproducible builds for end users
# -----------------------------------------------------------------------------
# CARGO PACKAGE ARTIFACTS
# -----------------------------------------------------------------------------
# Generated when running `cargo package` or `cargo publish --dry-run`
# These are temporary and should not be committed
/target/package/
*.crate
# Backup files created by cargo when editing Cargo.toml
**/*.rs.bk
Cargo.toml.orig
# -----------------------------------------------------------------------------
# RUST ANALYZER / IDE ARTIFACTS
# -----------------------------------------------------------------------------
# Rust-analyzer (VS Code, IntelliJ, etc.) generates this for code analysis
rust-project.json
# IntelliJ / CLion / RustRover
.idea/
*.iml
*.iws
*.ipr
.idea_modules/
# VS Code
.vscode/
*.code-workspace
# Fleet (JetBrains Fleet)
.fleet/
# Sublime Text
*.sublime-project
*.sublime-workspace
# Vim/Neovim
*.swp
*.swo
*~
.vim/
Session.vim
.netrwhist
# Emacs
*~
\#*\#
.\#*
.dir-locals.el
# -----------------------------------------------------------------------------
# OS-SPECIFIC FILES
# -----------------------------------------------------------------------------
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
# Linux
.directory
.Trash-*
# -----------------------------------------------------------------------------
# TESTING & COVERAGE
# -----------------------------------------------------------------------------
# Coverage reports (tarpaulin, kcov, etc.)
/coverage/
*.profraw
*.profdata
lcov.info
cobertura.xml
# Benchmark results
/target/criterion/
# -----------------------------------------------------------------------------
# DOCUMENTATION
# -----------------------------------------------------------------------------
# Generated docs (can be rebuilt with `cargo doc`)
# However, some projects commit docs/ for GitHub Pages
# Uncomment the next line if you want to ignore generated docs:
# /target/doc/
# -----------------------------------------------------------------------------
# SECURITY & CREDENTIALS (CRITICAL)
# -----------------------------------------------------------------------------
# NEVER commit these - they contain sensitive information
.cargo/credentials.toml
.cargo/credentials
.env
.env.local
*.pem
*.key
*.p12
# -----------------------------------------------------------------------------
# TEMPORARY & CACHE FILES
# -----------------------------------------------------------------------------
# Temporary files from various tools
*.tmp
*.temp
*.log
.cache/
# Rust incremental compilation cache (safe to ignore, speeds up rebuilds)
# Note: This is already inside /target/ but explicitly listing for clarity
/target/debug/incremental/
/target/release/incremental/
# -----------------------------------------------------------------------------
# PROJECT-SPECIFIC (OPTIONAL)
# -----------------------------------------------------------------------------
# Add any project-specific ignores below this line
# Examples directory outputs (if you have example programs that generate files)
# /examples/output/
# Test fixtures that are generated (not the fixtures themselves)
# /tests/fixtures/generated/
# Local development scripts
# /scripts/local/
# Draft documentation or notes
# /docs/drafts/
# ============================================================================
# WHAT SHOULD BE COMMITTED (FOR REFERENCE)
# ============================================================================
# ✅ Source code (src/, tests/, benches/, examples/)
# ✅ Cargo.toml (REQUIRED for publishing)
# ✅ Cargo.lock (ONLY if this becomes a binary crate with CLI)
# ✅ README.md (REQUIRED for crates.io)
# ✅ LICENSE or LICENSE-MIT / LICENSE-APACHE (REQUIRED for publishing)
# ✅ Build scripts (build.rs)
# ✅ Test fixtures (tests/fixtures/*.md)
# ✅ Documentation (docs/ if you maintain it manually)
# ✅ CI/CD configuration (.github/workflows/)
# ✅ Changelog (CHANGELOG.md)
# ✅ .gitignore (this file)
# ============================================================================
# ============================================================================
# PUBLISHING TO CRATES.IO - WHAT GETS INCLUDED
# ============================================================================
# When you run `cargo publish`, Cargo automatically:
# 1. Respects this .gitignore file (most patterns)
# 2. Excludes version control directories (.git/)
# 3. Excludes /target/
# 4. Includes ONLY tracked files in git (if repo is initialized)
#
# To verify what will be published, run:
# cargo package --list
#
# To test publishing without actually uploading:
# cargo publish --dry-run
#
# The generated .crate file will be in: target/package/
# ============================================================================