# Justfile for simplify_baml
# Default recipe - show available commands
default:
@just --list
# Run all tests
test:
cargo test --workspace
# Run tests with output
test-verbose:
cargo test --workspace -- --nocapture
# Check code compiles without building
check:
cargo check --workspace
# Format code
fmt:
cargo fmt --all
# Check formatting
fmt-check:
cargo fmt --all -- --check
# Run clippy lints
lint:
cargo clippy --workspace -- -D warnings
# Build in release mode
build:
cargo build --release --workspace
# Clean build artifacts
clean:
cargo clean
# Publish macros crate to crates.io
publish-macros:
cd simplify_baml_macros && cargo publish
# Publish main crate to crates.io (requires macros to be published first)
publish-main:
cargo publish
# Publish all crates in order (macros first, then main)
publish-all: publish-macros
@echo "Waiting for crates.io to index simplify_baml_macros..."
@sleep 30
cargo publish
# Dry-run publish for macros (check if it would succeed)
publish-macros-dry:
cd simplify_baml_macros && cargo publish --dry-run
# Dry-run publish for main crate
publish-main-dry:
cargo publish --dry-run
# Dry-run publish for all crates
publish-all-dry: publish-macros-dry publish-main-dry
# Install cargo-edit (required for version bumping)
install-cargo-edit:
cargo install cargo-edit
# Bump version for macros crate
bump-macros version:
cd simplify_baml_macros && cargo set-version {{version}}
# Bump version for main crate
bump-main version:
cargo set-version {{version}}
# Bump version for all crates
bump-all version: (bump-macros version) (bump-main version)
# Bump patch version (0.1.0 -> 0.1.1) for all crates
bump-patch:
cd simplify_baml_macros && cargo set-version --bump patch
cargo set-version --bump patch
# Bump minor version (0.1.0 -> 0.2.0) for all crates
bump-minor:
cd simplify_baml_macros && cargo set-version --bump minor
cargo set-version --bump minor
# Bump major version (0.1.0 -> 1.0.0) for all crates
bump-major:
cd simplify_baml_macros && cargo set-version --bump major
cargo set-version --bump major
# Show current versions
versions:
@echo "simplify_baml_macros:" && grep '^version' simplify_baml_macros/Cargo.toml | head -1
@echo "simplify_baml:" && grep '^version' Cargo.toml | head -1
# Run a specific example
example name:
cargo run --example {{name}}
# Generate documentation
docs:
cargo doc --workspace --no-deps --open