# Build Module - Native and Cross-Platform Building # Commands for building plugins natively and for multiple platforms # ๐Ÿ”จ NATIVE BUILD COMMANDS # Build all plugins for current platform [no-cd] build: @echo "๐Ÿ”จ Building all plugins..." @{{justfile_directory()}}/scripts/run.sh build_all.nu # Build all plugins with verbose output [no-cd] build-verbose: @echo "๐Ÿ”จ Building all plugins (verbose)..." @{{justfile_directory()}}/scripts/run.sh build_all.nu --verbose # Build all plugins in parallel (experimental) [no-cd] build-parallel: @echo "โšก Building all plugins in parallel..." @{{justfile_directory()}}/scripts/run.sh build_all.nu --parallel # Build specific plugin [no-cd] build-plugin PLUGIN: @echo "๐Ÿ”จ Building {{PLUGIN}}..." @cd {{PLUGIN}} && cargo build --release # ๐ŸŽฏ CROSS-COMPILATION COMMANDS # List available build targets [no-cd] build-targets: @echo "๐Ÿ“‹ Available build targets:" @{{justfile_directory()}}/scripts/run.sh build_cross.nu --list-targets # Build for specific target [no-cd] build-cross TARGET: @echo "๐ŸŽฏ Cross-compiling for {{TARGET}}..." @{{justfile_directory()}}/scripts/run.sh build_cross.nu --targets {{TARGET}} # Build for all supported targets [no-cd] build-cross-all: @echo "๐ŸŒ Cross-compiling for all targets..." @{{justfile_directory()}}/scripts/run.sh build_cross.nu --all-targets # Build for all targets in parallel [no-cd] build-cross-parallel: @echo "โšก Cross-compiling for all targets in parallel..." @{{justfile_directory()}}/scripts/run.sh build_cross.nu --all-targets --parallel # Build for specific target with Docker [no-cd] build-docker TARGET: @echo "๐Ÿณ Building {{TARGET}} with Docker..." @{{justfile_directory()}}/scripts/run.sh build_cross.nu --targets {{TARGET}} --docker # Force native compilation for target [no-cd] build-native TARGET: @echo "๐Ÿ  Building {{TARGET}} natively..." @{{justfile_directory()}}/scripts/run.sh build_cross.nu --targets {{TARGET}} --native # ๐Ÿณ DOCKER BUILD COMMANDS # Build Docker cross-compilation image [no-cd] build-docker-image: @echo "๐Ÿณ Building Docker cross-compilation image..." @{{justfile_directory()}}/scripts/run.sh build_docker_cross.nu --build-image # Force rebuild Docker image from scratch [no-cd] build-docker-image-fresh: @echo "๐Ÿณ Rebuilding Docker image from scratch..." @{{justfile_directory()}}/scripts/run.sh build_docker_cross.nu --build-image --force-rebuild --no-cache # Show Docker environment info [no-cd] build-docker-info: @echo "๐Ÿณ Docker environment information:" @{{justfile_directory()}}/scripts/run.sh build_docker_cross.nu --info # Build specific plugin with Docker build-docker-plugin PLUGIN TARGET: @echo "๐Ÿณ Building {{PLUGIN}} for {{TARGET}} with Docker..." @{{justfile_directory()}}/scripts/run.sh build_docker_cross.nu --plugin {{PLUGIN}} --target {{TARGET}} # Clean up Docker artifacts [no-cd] build-docker-cleanup: @echo "๐Ÿงน Cleaning up Docker artifacts..." @{{justfile_directory()}}/scripts/run.sh build_docker_cross.nu --cleanup # ๐Ÿงน BUILD MAINTENANCE # Clean all build artifacts [no-cd] build-clean: @echo "๐Ÿงน Cleaning build artifacts..." @for plugin in nu_plugin_*; do \ if [ -d "$$plugin" ]; then \ echo "Cleaning $$plugin..."; \ cd "$$plugin" && cargo clean && cd ..; \ fi; \ done # Update all dependencies (careful!) [no-cd] build-update-deps: @echo "โฌ†๏ธ Updating dependencies (this may break things)..." @for plugin in nu_plugin_*; do \ if [ -d "$$plugin" ]; then \ echo "Updating deps in $$plugin..."; \ cd "$$plugin" && cargo update && cd ..; \ fi; \ done # ๐Ÿ“Š BUILD INFORMATION # Show build help [no-cd] build-help: @echo "๐Ÿ”จ Build Module Help" @echo "===================" @echo "" @echo "NATIVE BUILDS:" @echo " build - Build all plugins for current platform" @echo " build-verbose - Build with verbose output" @echo " build-parallel - Build in parallel (experimental)" @echo " build-plugin PLUGIN - Build specific plugin" @echo "" @echo "CROSS-COMPILATION:" @echo " build-targets - List available targets" @echo " build-cross TARGET - Build for specific target" @echo " build-cross-all - Build for all targets" @echo " build-cross-parallel - Build all targets in parallel" @echo " build-docker TARGET - Build with Docker" @echo " build-native TARGET - Force native compilation" @echo "" @echo "DOCKER:" @echo " build-docker-image - Build Docker image" @echo " build-docker-image-fresh - Rebuild Docker image" @echo " build-docker-info - Show Docker info" @echo " build-docker-plugin PLUGIN TARGET - Build plugin with Docker" @echo " build-docker-cleanup - Clean Docker artifacts" @echo "" @echo "MAINTENANCE:" @echo " build-clean - Clean all artifacts" @echo " build-update-deps - Update dependencies" @echo "" @echo "EXAMPLES:" @echo " just build-cross linux-amd64" @echo " just build-docker linux-arm64" @echo " just build-plugin nu_plugin_clipboard"