550c98f275
Reorganización física de crates/: - core/ (mezclaba 6 propósitos) se divide en protocol/, init/, runtime/, compat/ - shared/ (3 crates) se redistribuye en protocol/ e init/ - lapaloma (sub-módulo de ui_engine) se promueve a modules/pineal/ Renames de proyectos: - shipote → shuma (runtime de sandboxes) - nouser → akasha (explorador de Mónadas) - yahweh → nahual (motor GPUI, antes ui_engine/) - lapaloma → pineal (data-viz agnóstica) Fraccionamiento UI → core agnóstico: - vista-core (DeckState + snap, 175 LOC, 5 tests verdes) - barra-core (Task + render_html + sanitize, 90 LOC, 5 tests verdes) - vista-web y barra-web ahora son thin DOM bindings Documentación nueva: - 16 SDDs por subdirectorio (≤80 LOC c/u): protocol/init/runtime/compat + 10 módulos + apps/ - docs/STATUS.md con cifras reales por proyecto - docs/ROADMAP.md con plan a finalización (6 hitos, ~6-8 semanas) - CHANGELOG.md particionado en docs/changelog/<proyecto>.md (7 buckets) Automatización: - scripts/reorg.py — script idempotente que: git mv directorios, renombra package names, recomputa path = refs, reescribe imports rust, actualiza workspace Cargo.toml. Soporta --dry-run. - scripts/split-changelog.py — particiona CHANGELOG por componente. Validación: - cargo check --workspace pasa (124 crates + 2 nuevos cores). - 10 tests adicionales (5 en vista-core + 5 en barra-core) verdes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
46 lines
1.2 KiB
Rust
46 lines
1.2 KiB
Rust
//! `brahman-wit-info` — inspecciona un archivo WIT y lista sus worlds.
|
|
//!
|
|
//! Uso:
|
|
//! ```sh
|
|
//! cargo run -p brahman-card-wit --example brahman-wit-info -- shared_wit/protocol.wit
|
|
//! ```
|
|
|
|
use std::process::ExitCode;
|
|
|
|
fn main() -> ExitCode {
|
|
let path = match std::env::args().nth(1) {
|
|
Some(p) => p,
|
|
None => {
|
|
eprintln!("uso: brahman-wit-info <ruta.wit>");
|
|
return ExitCode::from(2);
|
|
}
|
|
};
|
|
|
|
let worlds = match brahman_card_wit::parse_wit_file(&path) {
|
|
Ok(w) => w,
|
|
Err(e) => {
|
|
eprintln!("error parseando {path}: {e}");
|
|
return ExitCode::from(1);
|
|
}
|
|
};
|
|
|
|
if worlds.is_empty() {
|
|
println!("(ningún world declarado)");
|
|
return ExitCode::SUCCESS;
|
|
}
|
|
|
|
println!("{} world(s):", worlds.len());
|
|
for w in &worlds {
|
|
println!();
|
|
println!(" package: {}", w.package);
|
|
println!(" world: {}", w.world);
|
|
if !w.imports.is_empty() {
|
|
println!(" imports: {}", w.imports.join(", "));
|
|
}
|
|
if !w.exports.is_empty() {
|
|
println!(" exports: {}", w.exports.join(", "));
|
|
}
|
|
}
|
|
ExitCode::SUCCESS
|
|
}
|