# Python
__pycache__/
*.pyc
dist/
*.egg-info/

# clings runtime
.clings/
.clings-state.txt

# Editor / IDE
.devin/
.vscode/
.idea/
*.swp
*~

# OS
.DS_Store
Thumbs.db

# ─── C build artifacts ─────────────────────────────────
# Reference: GitHub official C.gitignore template
# https://github.com/github/gitignore/blob/main/C.gitignore

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# ─── Project-specific: compiled binaries without extension ───
# C exercises produce extension-less ELF binaries (e.g. dining_philosophers,
# rdt_stop_wait). Since hatchling sdist includes exercises/ and solutions/,
# we cannot use a blanket "exercises/*" rule. Instead, ignore any file in
# exercises/ or solutions/ that is NOT a known source file.
#
# Strategy: whitelist source files, ignore everything else in exercise dirs.
#
# Known source extensions in exercise directories:
#   .c .h .md .toml Makefile expected_output.txt
#
# Use negation: ignore all, then un-ignore known sources.
exercises/*/*
solutions/*/*
!exercises/*/*.c
!exercises/*/*.h
!exercises/*/*.md
!exercises/*/*.toml
!exercises/*/Makefile
!exercises/*/expected_output.txt
!solutions/*/*.c
!solutions/*/*.h
!solutions/*/*.md
!solutions/*/*.toml
!solutions/*/Makefile
!solutions/*/expected_output.txt

# Keep directory structure (git doesn't track empty dirs, but this helps)
!exercises/lessons/
!exercises/nccl-cc/
