archscript 0.2.4

ArchScript programming language — Python-like syntax, Haskell-inspired features, Arch Linux integration
Documentation
# ArchScript — justfile
# Run recipes with: just <recipe>
# List all recipes: just --list

# Default recipe: build and test
default: build test

# ── Build ─────────────────────────────────────────────────────────────────────

# Build in debug mode
build:
    cargo build

# Build in release mode
release:
    cargo build --release

# Clean build artifacts
clean:
    cargo clean

# ── Test ──────────────────────────────────────────────────────────────────────

# Run all tests (unit + integration)
test:
    cargo test

# Run tests with output shown
test-verbose:
    cargo test -- --nocapture

# Run only unit tests (parser + interpreter + stdlib)
test-unit:
    cargo test --lib

# Run only integration tests
test-integration:
    cargo test --test integration

# Run only stdlib tests
test-stdlib:
    cargo test stdlib

# Run only REPL tests
test-repl:
    cargo test repl

# Run a specific test by name
test-one name:
    cargo test {{name}} -- --nocapture

# ── Lint & Format ─────────────────────────────────────────────────────────────

# Run clippy linter
lint:
    cargo clippy -- -D warnings

# Check formatting
fmt-check:
    cargo fmt -- --check

# Auto-format code
fmt:
    cargo fmt

# Full quality check: format, lint, test
check: fmt-check lint test

# ── Run ───────────────────────────────────────────────────────────────────────

# Run an ArchScript source file
run file:
    cargo run -- run {{file}}

# Evaluate an expression inline
eval expr:
    cargo run -- eval "{{expr}}"

# Parse a file and print AST (for debugging)
parse file:
    cargo run -- parse {{file}}

# Start the interactive REPL
repl:
    cargo run -- repl

# Run the hello world example
hello:
    cargo run -- run examples/hello.as

# Run the functions example
functions:
    cargo run -- run examples/functions.as

# Run the Arch Linux stdlib demo
archlinux:
    cargo run -- run examples/archlinux.as

# Run all examples
examples: hello functions archlinux

# ── Development ───────────────────────────────────────────────────────────────

# Watch for changes and run tests (requires cargo-watch)
watch:
    cargo watch -x test

# Watch and run a specific file on changes
watch-run file:
    cargo watch -x "run -- run {{file}}"

# Build docs
doc:
    cargo doc --no-deps --open

# Show project stats (lines of code)
loc:
    @echo "=== Source files ==="
    @wc -l src/*.rs src/*.pest src/stdlib/*.rs
    @echo ""
    @echo "=== Test files ==="
    @wc -l tests/*.rs
    @echo ""
    @echo "=== Total ==="
    @wc -l src/*.rs src/*.pest src/stdlib/*.rs tests/*.rs

# Show the pest grammar
grammar:
    @cat src/archscript.pest

# ── CI ────────────────────────────────────────────────────────────────────────

# Full CI pipeline: format check, lint, build, test
ci: fmt-check lint build test
    @echo "CI passed."

# ── Release & Install ────────────────────────────────────────────────────────

# Install locally
install:
    cargo install --path .

# Uninstall
uninstall:
    cargo uninstall archscript

# ── Deploy ───────────────────────────────────────────────────────────────────

# Check deployment prerequisites
deploy-check:
    ./deploy.sh check

# Show current version
version:
    @grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/'

# Create a release tag (triggers CI/CD): just deploy-tag 0.2.0
deploy-tag version:
    ./deploy.sh tag {{version}}

# Publish to crates.io (manual)
deploy-cargo:
    ./deploy.sh cargo

# Build and publish Python wheel to PyPI (manual)
deploy-pypi:
    ./deploy.sh pypi

# Full release — tag + publish to crates.io + PyPI: just deploy-all 0.2.0
deploy-all version:
    ./deploy.sh all {{version}}

# Build Python wheel locally (for testing)
build-wheel:
    pip install maturin 2>/dev/null || true
    maturin build --release --out dist/

# Dry-run publish to crates.io (verify packaging)
publish-dry-run:
    cargo publish --dry-run