feat: implement just-based build system with distinct binary names

Replace Makefile with justfile for better build management:

Build System Changes:
- Add comprehensive justfile with recipes for both implementations
- Configure Go to build as `mail2couch-go`
- Configure Rust to build as `mail2couch-rs` via Cargo.toml
- Add universal build, test, clean, and install recipes
- Include development convenience recipes and utility commands

New Justfile Features:
- `just build` - builds both implementations
- `just install` - installs both to /usr/local/bin
- `just test` - runs tests for both implementations
- `just sizes` - shows binary size comparison
- `just versions` - compares version outputs
- `just --list` - shows all available recipes

Documentation Updates:
- Update CLAUDE.md with justfile usage examples
- Replace make commands with just equivalents
- Add new utility commands (sizes, versions)
- Update IMPLEMENTATION_COMPARISON.md deployment sections

Benefits of just over make:
- Better command-line interface with `--list`
- More intuitive recipe syntax
- Better suited for development workflows
- Cross-platform compatibility
- Built-in help and documentation

Binary Naming:
- Go implementation: `mail2couch-go` (11M)
- Rust implementation: `mail2couch-rs` (8.3M)
- Clear distinction prevents conflicts
- Parallel installation support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-03 19:01:42 +02:00
commit 2cd65fd137
5 changed files with 374 additions and 27 deletions

View file

@ -442,6 +442,8 @@ Both implementations currently share the same security limitations and features:
### Go Implementation Deployment
**Binary Name**: `mail2couch-go`
**Advantages**:
- Single binary deployment
- Minimal system dependencies
@ -450,16 +452,21 @@ Both implementations currently share the same security limitations and features:
**Best Practices**:
```bash
# Build for production
cd go && go build -ldflags="-s -w" -o mail2couch .
# Build for production using justfile
just build-go-release
# Or build directly
cd go && go build -ldflags="-s -w" -o mail2couch-go .
# Deploy with systemd service
sudo cp mail2couch /usr/local/bin/
sudo systemctl enable mail2couch.service
sudo cp go/mail2couch-go /usr/local/bin/
sudo systemctl enable mail2couch-go.service
```
### Rust Implementation Deployment
**Binary Name**: `mail2couch-rs`
**Advantages**:
- Better resource utilization under load
- Superior error recovery
@ -468,18 +475,33 @@ sudo systemctl enable mail2couch.service
**Best Practices**:
```bash
# Build optimized release
# Build optimized release using justfile
just build-rust-release
# Or build directly
cd rust && cargo build --release
# Deploy with enhanced monitoring
sudo cp target/release/mail2couch /usr/local/bin/
sudo systemctl enable mail2couch.service
sudo cp rust/target/release/mail2couch-rs /usr/local/bin/
sudo systemctl enable mail2couch-rs.service
# Configure structured logging
export RUST_LOG=info
export MAIL2COUCH_LOG_FORMAT=json
```
### Universal Installation
```bash
# Build and install both implementations
just build-release
sudo just install
# This installs:
# - /usr/local/bin/mail2couch-go
# - /usr/local/bin/mail2couch-rs
```
---
## Future Development Roadmap