syntaxis/docs/howto/live_demo.sh
Jesús Pérez 9cef9b8d57 refactor: consolidate configuration directories
Merge _configs/ into config/ for single configuration directory.
Update all path references.

Changes:
- Move _configs/* to config/
- Update .gitignore for new patterns
- No code references to _configs/ found

Impact: -1 root directory (layout_conventions.md compliance)
2025-12-26 18:36:23 +00:00

100 lines
4.8 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo "════════════════════════════════════════════════════════════════"
echo "DEMOSTRACIÓN LIVE: Comandos para Entender Target Selection"
echo "════════════════════════════════════════════════════════════════"
echo ""
echo "1⃣ DETECTAR EL SISTEMA (uname)"
echo "─────────────────────────────────────────────────────────────────"
echo "$ uname -s"
uname -s
echo ""
echo "$ uname -m"
uname -m
echo ""
echo "$ uname -a"
uname -a
echo ""
echo "2⃣ INFORMACIÓN DE RUST (rustc)"
echo "─────────────────────────────────────────────────────────────────"
echo "$ rustc --version"
rustc --version
echo ""
echo "$ rustc --print host-triple"
rustc --print host-triple
echo ""
echo "3⃣ VER ARQUITECTURA EN EL BINARIO COMPILADO"
echo "─────────────────────────────────────────────────────────────────"
if [ -f "/Users/Akasha/Development/syntaxis/target/release/workspace-cli" ]; then
echo "$ file target/release/workspace-cli"
file /Users/Akasha/Development/syntaxis/target/release/workspace-cli
else
echo "✓ (binario no compilado aún)"
fi
echo ""
echo "4⃣ INFORMACIÓN DEL TOOLCHAIN"
echo "─────────────────────────────────────────────────────────────────"
echo "$ rustup default"
rustup default
echo ""
echo "$ rustup toolchain list"
rustup toolchain list
echo ""
echo "5⃣ TARGETS DISPONIBLES"
echo "─────────────────────────────────────────────────────────────────"
echo "$ rustup target list | grep installed"
rustup target list | grep installed
echo ""
echo "6⃣ FEATURES DEL CPU QUE DETECTA RUST"
echo "─────────────────────────────────────────────────────────────────"
echo "$ rustc --print cfg"
rustc --print cfg
echo ""
echo "7⃣ INFORMACIÓN DE CARGO"
echo "─────────────────────────────────────────────────────────────────"
echo "$ cargo --version"
cargo --version
echo ""
echo "8⃣ SYSROOT (DONDE ESTÁ RUST INSTALADO)"
echo "─────────────────────────────────────────────────────────────────"
echo "$ rustc --print sysroot"
rustc --print sysroot
echo ""
echo "9⃣ VER TARGETS INSTALADOS"
echo "─────────────────────────────────────────────────────────────────"
echo "$ rustc --print sysroot | xargs -I {} ls {}/lib/rustlib/"
rustc --print sysroot | xargs -I {} ls {}/lib/rustlib/
echo ""
echo "🔟 CONFIG PERSONALIZADA DE CARGO"
echo "─────────────────────────────────────────────────────────────────"
if [ -f ".cargo/config.toml" ]; then
echo "✓ Existe .cargo/config.toml"
cat .cargo/config.toml
else
echo "✗ NO existe .cargo/config.toml (usa valores por defecto)"
fi
echo ""
echo "════════════════════════════════════════════════════════════════"
echo "RESUMEN: CÓMO ELIGE CARGO EL TARGET"
echo "════════════════════════════════════════════════════════════════"
echo ""
echo "1. Tu sistema: $(uname -s) / $(uname -m)"
echo "2. Rust lo detecta como: $(rustc --print host-triple)"
echo "3. Cargo crea: target/$(rustc --print host-triple | cut -d- -f1)/release/"
echo "4. Compila SOLO para: $(rustc --print host-triple)"
echo "5. Genera binarios: ARM64 (Mach-O en macOS)"
echo ""
echo "✅ TODO AUTOMÁTICO - No necesita configuración"
echo ""