1 unstable release

0.1.0 Apr 13, 2024

#757 in Operating systems

Download history 154/week @ 2024-04-07 33/week @ 2024-04-14

187 downloads per month
Used in 3 crates

GPL-3.0-or-later

1.5MB
27K 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

~5–15MB
~194K SLoC