Expand description
§smop
Batteries-included scripting utilities for Rust.
use smop::prelude::* and write Rust scripts like Python,
but with a compiler that won’t let them rot.
§Quick Start
use smop::prelude::*;
fn main() -> Result<()> {
let home = path::home();
let content = fs::read_string(home.join(".bashrc"))?;
println!("Bashrc has {} lines", content.lines().count());
Ok(())
}Re-exports§
pub use anyhow;
Modules§
- archive
- Archive creation and extraction (ZIP, TAR, TAR.GZ).
- cli
- CLI utilities.
- env
- Environment variable utilities.
- fs
- File system utilities.
- http
- HTTP client utilities.
- path
- Path utilities for scripting.
- prelude
- The smop prelude.
- Terminal output utilities.
- sh
- Shell command execution utilities.
- time
- Time and date utilities.
Macros§
- error
- Prints an error message with a red X prefix.
- success
- Prints a success message with a green checkmark prefix.
- warn
- Prints a warning message with a yellow warning prefix.
Traits§
- Context
- Provides the
contextmethod forResult.
Type Aliases§
- Result
Result<T, Error>