#project-root #xscript #local-env #change-dir

xscript

A library for writing robust shell-script-like programs and running commands with ease

6 releases (3 breaking)

0.4.0 Jan 10, 2025
0.3.0 Dec 23, 2023
0.2.0 Jul 23, 2023
0.1.2 Jul 9, 2023

#657 in Filesystem

Download history 1414/week @ 2025-01-29 2187/week @ 2025-02-05 372/week @ 2025-02-12 314/week @ 2025-02-19 264/week @ 2025-02-26 510/week @ 2025-03-05 267/week @ 2025-03-12 374/week @ 2025-03-19 297/week @ 2025-03-26 289/week @ 2025-04-02 214/week @ 2025-04-09 240/week @ 2025-04-16 615/week @ 2025-04-23 521/week @ 2025-04-30 458/week @ 2025-05-07 343/week @ 2025-05-14

1,966 downloads per month

MIT/Apache

42KB
1K SLoC

XScript

A library for writing robust shell-script-like programs and running commands anywhere with ease.

XScript Crate Docs License: MIT/Apache

use xscript::{read_str, run, vars, Run, LocalEnv};

let mut env = LocalEnv::current_dir()?.with_vars(vars! {
    RUSTDOCFLAGS = "--cfg docsrs --cfg xscript_unstable",
    RUSTFLAGS = "--cfg xscript_unstable",
});

let project_root = read_str!(env, ["git", "rev-parse", "--show-toplevel"])?;
env.change_dir(project_root)?;

let cargo_args = ["+nightly"];
let doc_args = ["--lib", "--all-features"];
run!(env, ["cargo", ...cargo_args, "doc", ...doc_args])?;

Checkout the documentation for details.

⚖️ Licensing

This project is licensed under either MIT or Apache 2.0 at your opinion. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache 2.0 license, shall be dual licensed as above, without any additional terms or conditions.


Made with ❤️ for OSS by Silitics.

Dependencies

~0–8MB
~62K SLoC