1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-13 18:47:58 +00:00

docs/README ~ revise build instructions for binaries

This commit is contained in:
Roy Ivy III 2021-04-07 20:59:40 -05:00
parent d0abe9e6c9
commit 8d7d1b0f35

View file

@ -13,7 +13,7 @@
----------------------------------------------- -----------------------------------------------
<!-- markdownlint-disable commands-show-output no-duplicate-heading --> <!-- markdownlint-disable commands-show-output no-duplicate-heading -->
<!-- spell-checker:ignore markdownlint ; (jargon) multicall ; (misc) riscv aarch ; (names/acronyms) BusyBox BusyBox's BusyTest MSVC NixOS PowerPC WASI WASM ; (options) DESTDIR RUNTEST --> <!-- spell-checker:ignore markdownlint ; (jargon) multicall ; (misc) aarch riscv uutil uutils ; (names/acronyms) BusyBox BusyBox's BusyTest MSVC NixOS PowerPC WASI WASM ; (options) DESTDIR RUNTEST UTILNAME -->
uutils is an attempt at writing universal (as in cross-platform) CLI uutils is an attempt at writing universal (as in cross-platform) CLI
utilities in [Rust](http://www.rust-lang.org). This repository is intended to utilities in [Rust](http://www.rust-lang.org). This repository is intended to
@ -46,11 +46,13 @@ On both Windows and Redox, only the nightly version is tested currently.
## Build Instructions ## Build Instructions
There are currently two methods to build uutils: GNU Make and Cargo. However, There are currently two methods to build the uutils binaries: either Cargo
while there may be two methods, both systems are required to build on Unix or GNU Make.
(only Cargo is required on Windows).
First, for both methods, we need to fetch the repository: > Building the full package, including all documentation, requires both Cargo
> and Gnu Make on a Unix platform.
For either method, we first need to fetch the repository:
```bash ```bash
$ git clone https://github.com/uutils/coreutils $ git clone https://github.com/uutils/coreutils
@ -63,29 +65,37 @@ Building uutils using Cargo is easy because the process is the same as for
every other Rust program: every other Rust program:
```bash ```bash
# to keep debug information, compile without --release
$ cargo build --release $ cargo build --release
``` ```
Because the above command attempts to build utilities that only work on This command builds the most portable common core set of uutils into a multicall
Unix-like platforms at the moment, to build on Windows, you must do the (BusyBox-type) binary, named 'coreutils', on most Rust-supported platforms.
following:
Additional platform-specific uutils are often available. Building these
expanded sets of uutils for a platform (on that platform) is as simple as
specifying it as a feature:
```bash ```bash
# to keep debug information, compile without --release $ cargo build --release --features macos
$ cargo build --release --no-default-features --features windows # or ...
$ cargo build --release --features windows
# or ...
$ cargo build --release --features unix
``` ```
If you don't want to build every utility available on your platform into the If you don't want to build every utility available on your platform into the
multicall binary (the Busybox-esque binary), you can also specify which ones final binary, you can also specify which ones you want to build manually.
you want to build manually. For example: For example:
```bash ```bash
$ cargo build --features "base32 cat echo rm" --no-default-features $ cargo build --features "base32 cat echo rm" --no-default-features
``` ```
If you don't even want to build the multicall binary and would prefer to just If you don't want to build the multicall binary and would prefer to build
build the utilities as individual binaries, that is possible too. For example: the utilities as individual binaries, that is also possible. Each utility
is contained in it's own package within the main repository, named
"uu_UTILNAME". To build individual utilities, use cargo to build just the
specific packages (using the `--package` [aka `-p`] option). For example:
```bash ```bash
$ cargo build -p uu_base32 -p uu_cat -p uu_echo -p uu_rm $ cargo build -p uu_base32 -p uu_cat -p uu_echo -p uu_rm