squall-serialization 0.1.0

Agentic serialization
Documentation
# Makefile for Rust library crate: cargo-centric, no Docker/Nix
# ./Makefile

CRATE_DIR      ?= .
CRATE_NAME     ?= squall-serialization

.PHONY: all build test check clean publish-crate check-cargo-env nix

all: build

build:
	cargo build --workspace --locked

test:
	cargo test --workspace

check:
	cargo check --workspace

clean:
	cargo clean

nix:
	nix build .#default

publish-crate: check-cargo-env
	@echo "📦  Publishing $(CRATE_NAME) to crates.io"
	cd "$(CRATE_DIR)" && cargo publish --locked --token "$$CARGO_REGISTRY_TOKEN"

check-cargo-env:
	@[ -n "$$CARGO_REGISTRY_TOKEN" ] || (echo "CARGO_REGISTRY_TOKEN missing. Run 'cargo login' and export it." && exit 3)
	@[ -f "$(CRATE_DIR)/Cargo.toml" ] || (echo "Cargo.toml not found in $(CRATE_DIR)" && exit 4)
	@grep -q '^name *= *"$(CRATE_NAME)"' "$(CRATE_DIR)/Cargo.toml" || (echo "Cargo.toml does not match CRATE_NAME ($(CRATE_NAME))" && exit 5)