Skip to content

Commit 8315c7e

Browse files
committed
feat: add Docker build support with local cache and custom image
Add comprehensive Docker build infrastructure for both CLI and GUI builds with dependency caching and optimized build times. Changes: Docker Infrastructure: - Add Dockerfile with pre-installed GUI build dependencies - Base: rust:latest - Includes: libdbus-1-dev, pkg-config, libxkbcommon-dev, wayland, xcb - Image size: 2.34GB (600MB compressed) - Add .dockerignore to optimize build context - Excludes: target/, bin/, .cache/, .git/, docs/ Makefile: - Add docker-image target to build custom Docker image - Add build-docker target for CLI builds using Docker - Uses local .cache directory for cargo registry and git cache - Mounts as user to avoid permission issues - Build time: ~12s (with cache) - Add gui-build-docker target for GUI builds using Docker - Uses same cache as CLI builds - No runtime dependency installation needed - Build time: ~54s (with cache) - Update help documentation for new Docker targets Build Cache: - Add .cache directory for persistent cargo package cache - Separate subdirectories: .cache/registry and .cache/git - Shared between CLI and GUI builds - Avoids re-downloading packages on each build - Add .cache/ to .gitignore CLAUDE.md: - Enhanced architecture documentation with detailed patterns - Add layered architecture flow diagrams - Document critical architectural patterns: - Trait-based abstraction for testing without hardware - Validated domain types pattern - Error hierarchy and propagation - No-panic guarantee in library code - Dry-run pattern for safe testing - Add GUI architecture section (Elm Architecture/TEA pattern) - Add complete workflow for adding new commands - Add detailed file structure documentation - Add GUI commands to quick reference Benefits: - Fast, reproducible builds on any system with Docker - No need to install Rust or build dependencies on host - Consistent build environment across machines - Package cache persistence reduces build times - Clean separation of build dependencies
1 parent 4c35f48 commit 8315c7e

File tree

5 files changed

+614
-208
lines changed

5 files changed

+614
-208
lines changed

.dockerignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Build artifacts
2+
target/
3+
bin/
4+
.cache/
5+
completions/
6+
7+
# Git
8+
.git/
9+
.gitignore
10+
11+
# Editor/IDE
12+
.idea/
13+
.vscode/
14+
*.swp
15+
*.swo
16+
*~
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db
21+
22+
# Documentation
23+
docs/
24+
screenshots/
25+
*.md
26+
LICENSE
27+
28+
# Project specific
29+
*plan

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/target/
33
/bin/
44
/completions/
5+
/.cache/
56

67
# Editor/IDE
78
.idea/

0 commit comments

Comments
 (0)