Skip to content

Commit 33c4a6f

Browse files
Add run_make_support::build_native_static_lib function
1 parent 27ff241 commit 33c4a6f

File tree

1 file changed

+15
-1
lines changed
  • src/tools/run-make-support/src

1 file changed

+15
-1
lines changed

src/tools/run-make-support/src/lib.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,21 @@ pub use python::python_command;
5555
pub use rustc::{aux_build, bare_rustc, rustc, Rustc};
5656
pub use rustdoc::{bare_rustdoc, rustdoc, Rustdoc};
5757

58-
/// [`diff`][mod@diff] is implemented in terms of the [similar] library.
58+
/// Implement common helpers for command wrappers. This assumes that the command wrapper is a struct
59+
/// containing a `cmd: Command` field and a `output` function. The provided helpers are:
60+
///
61+
/// 1. Generic argument acceptors: `arg` and `args` (delegated to [`Command`]). These are intended
62+
/// to be *fallback* argument acceptors, when specific helpers don't make sense. Prefer to add
63+
/// new specific helper methods over relying on these generic argument providers.
64+
/// 2. Environment manipulation methods: `env`, `env_remove` and `env_clear`: these delegate to
65+
/// methods of the same name on [`Command`].
66+
/// 3. Output and execution: `output`, `run` and `run_fail` are provided. `output` waits for the
67+
/// command to finish running and returns the process's [`Output`]. `run` and `run_fail` are
68+
/// higher-level convenience methods which waits for the command to finish running and assert
69+
/// that the command successfully ran or failed as expected. Prefer `run` and `run_fail` when
70+
/// possible.
71+
///
72+
/// Example usage:
5973
///
6074
/// [similar]: https://github.com/mitsuhiko/similar
6175
pub use diff::{diff, Diff};

0 commit comments

Comments
 (0)