5 releases (3 breaking)

0.4.0 Sep 28, 2024
0.3.0 Aug 22, 2024
0.2.1 Jul 12, 2024
0.2.0 Jun 9, 2024
0.1.0 Apr 13, 2024

#710 in Operating systems

25 downloads per month
Used in 5 crates

GPL-3.0-or-later

1.5MB
30K SLoC

Yash-env

yash-env is a Rust library crate that defines the shell execution environment and provides logic for manipulating it. This crate is part of yash.

yash-env at crates.io yash-env at docs.rs Build status

License

This crate is distributed under GPLv3.


lib.rs:

This crate defines the shell execution environment.

A shell execution environment, [Env], is a collection of data that may affect or be affected by the execution of commands. The environment consists of application-managed parts and system-managed parts. Application-managed parts are implemented in pure Rust in this crate. Many application-managed parts like [function]s and [variable]s can be manipulated independently of interactions with the underlying system. System-managed parts, on the other hand, depend on the underlying system. Attributes like the working directory and umask are managed by the system to be accessed only by interaction with the system interface.

The System trait is the interface to the system-managed parts. RealSystem provides an implementation for System that interacts with the underlying system. VirtualSystem is a dummy for simulating the system's behavior without affecting the actual system.

Dependencies

~6–15MB
~218K SLoC