Plantilla de proyecto·Pro
CLI en Rust: contador de líneas
Una herramienta de línea de comandos en Rust que cuenta líneas de código, de comentarios y en blanco por lenguaje en una carpeta. Es un proyecto de Cargo sin dependencias y con tests unitarios. Necesita Rust y Cargo en el entorno Linux (unos 370 MB).
Para instalarlo necesitas PocketCode Pro.
Si tienes PocketCode instalado en tu Android, esto abre la página en la app.
Vista previa
Ficheros
Cargo.lock
Cargo.toml
README.md
src/count.rs
src/main.rsREADME.md
# loc: a Rust command-line tool Counts lines of code, comments and blank lines per language in a folder, like a small `cloc`. It skips `.git`, `target`, `node_modules` and other build or dependency folders. A Cargo project with no dependencies (only the standard library), split into two modules, with unit tests. ## Run it in PocketCode You need the app's Linux environment with Rust and Cargo (install it in Settings › Compilers and runtimes; about 370 MB). 1. Open the terminal in this project's folder (Open Terminal Here, in the editor menu). 2. Build and run it on this project: ```sh cargo run -- . ``` The first build takes a while on a phone; later ones only rebuild what changed. 3. Point it at any folder of your projects, and sort the table: ```sh cargo run -- ../other-project --sort files cargo run -- --help ``` You can also open `src/main.rs` and tap Run: it counts the `src` folder. ## Run the tests ```sh cargo test ``` ## Build a release binary ```sh cargo build --release ./target/release/loc ~/some/folder ``` ## Where things areEsta vista previa está recortada. El contenido completo llega al instalarlo.
Cambios en la 1.0.0
Primera versión.