- remove Java plugins (velocity/paper), dashboard, all MC-specific code
(handshake, death_code, varint, hostname-HMAC); available in history pre-v0.2
- merge crates/* into one package with src/bin/{rampart,rampart-manager,rampart-cli}
- ProtocolHandler trait + registry (no implementations yet), universal PoW kept
- XDP: universal L3/L4 filter (xdp/core/) + pluggable hook API (xdp/hooks/),
fix IPv6 saddr bug; clang build verified
- docs: bilingual knowledge base (docs/kb/: attacks x4, defense-levels,
practice x3), rewrite README/architecture for universal concept
- TODO.md v4.0: <=300-line module limit, competitor benchmark section (ref/)
- deploy/CI/docs cleanup: no MC references, new binary names
cargo build/clippy(-D warnings)/test green (55 tests)
82 lines
1.4 KiB
Makefile
82 lines
1.4 KiB
Makefile
# Rampart — Build System
|
|
|
|
CARGO = cargo
|
|
TARGET_DIR = target
|
|
|
|
.PHONY: all build release test check check-all fmt fmt-check clippy clean deny audit
|
|
.PHONY: ebpf ebpf-clean
|
|
.PHONY: docker docker-build docker-up docker-down docker-logs
|
|
.PHONY: ci ci-full
|
|
|
|
all: check test build
|
|
|
|
# --- Rust ---
|
|
|
|
build:
|
|
$(CARGO) build
|
|
|
|
release:
|
|
$(CARGO) build --release
|
|
|
|
check:
|
|
$(CARGO) check
|
|
|
|
check-all:
|
|
$(CARGO) check --all-features
|
|
|
|
test:
|
|
$(CARGO) test
|
|
|
|
fmt:
|
|
$(CARGO) fmt --all
|
|
|
|
fmt-check:
|
|
$(CARGO) fmt --all --check
|
|
|
|
clippy:
|
|
$(CARGO) clippy --all-targets --all-features -- -D warnings
|
|
|
|
clean:
|
|
$(CARGO) clean
|
|
|
|
deny:
|
|
cargo deny check
|
|
|
|
audit:
|
|
cargo audit
|
|
|
|
# --- eBPF / XDP ---
|
|
|
|
ebpf:
|
|
@echo "Building XDP/eBPF filter..."
|
|
mkdir -p $(TARGET_DIR)/xdp && \
|
|
clang -O2 -g -target bpf -c xdp/core/universal_filter.c -o $(TARGET_DIR)/xdp/universal_filter.o 2>/dev/null || \
|
|
echo "WARNING: clang+bpf not installed, skipping eBPF build"
|
|
|
|
ebpf-clean:
|
|
rm -f $(TARGET_DIR)/xdp/universal_filter.o
|
|
|
|
# --- Docker ---
|
|
|
|
docker-build:
|
|
docker compose -f deploy/docker-compose.yml build
|
|
|
|
docker-up: docker-build
|
|
docker compose -f deploy/docker-compose.yml up -d
|
|
|
|
docker-down:
|
|
docker compose -f deploy/docker-compose.yml down
|
|
|
|
docker-logs:
|
|
docker compose -f deploy/docker-compose.yml logs -f
|
|
|
|
# --- Convenience ---
|
|
|
|
checkstyle: fmt-check clippy
|
|
@echo "✓ Checkstyle passed (rustfmt + clippy)"
|
|
|
|
ci: checkstyle test build deny
|
|
@echo "✓ CI passed"
|
|
|
|
ci-full: ci ebpf
|
|
@echo "✓ Full CI passed"
|