Skip to content

Commit

Permalink
soft wrapping of README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bazhenov committed May 7, 2023
1 parent 2e00b84 commit aca9b05
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

## Motivation

It's quite challenging to export secondary artifacts like tests and benchmark executables. Those kind of artifacts can be very valuable for different reasons:
It's quite challenging to export secondary artifacts like tests and benchmark executables. Those kind of artifacts can
be very valuable for different reasons:

1. packing test executables in the contaier to run them later on a different platform
2. comparing and analyzing assembly of performance benchmarks

For final artifacts we have `target/(release|debug)/{crate-name}`, but test and benchmark executables are containing hash like `target/release/deps/app-25de5d28a523d3c2`. Moreover it changes every time compiler options are changed. For this reason methods like `find` and `cp` doesn't work well for extracting such artifacts.
For final artifacts we have `target/(release|debug)/{crate-name}`, but test and benchmark executables are containing
hash like `target/release/deps/app-25de5d28a523d3c2`. Moreover it changes every time compiler options are changed. For
this reason methods like `find` and `cp` doesn't work well for extracting such artifacts.

Thankfully, compiler provide service messages (`cargo build --message-format=json`) which allows to list all the artifacts generated by the compiler.
Thankfully, compiler provide service messages (`cargo build --message-format=json`) which allows to list all the
artifacts generated by the compiler.

## Installing

Expand All @@ -23,4 +27,5 @@ $ cargo install --git=https://github.com/bazhenov/cargo-export.git
$ cargo export target/tests -- test
```

Under the hood this command will run `cargo test --no-run --message-format=json` and copy all the generated binaries in the `target/tests` dirctory.
Under the hood this command will run `cargo test --no-run --message-format=json` and copy all the generated binaries in
the `target/tests` dirctory.

0 comments on commit aca9b05

Please sign in to comment.