Expand description
Escargot: A Cargo API
Features
Features:
print
for logged output to be printed instead, generally for test writing.
Why escargot
Compared to depending on cargo
:
- Faster compile times.
- Simpler API.
- Better interop with projects relying on other cargo versions.
- Probably slower execution, especially on platforms without an optimized
fork
(e.g. Windows).
Relevant crates
Other related crates:
- cargo for the real thing
- cargo-metadata for a similar project specifically geared to the
metadata
subcommand.
Example
extern crate escargot;
extern crate assert_fs;
let temp = assert_fs::TempDir::new().unwrap();
escargot::CargoBuild::new()
.bin("bin")
.current_release()
.current_target()
.manifest_path("tests/fixtures/bin/Cargo.toml")
.target_dir(temp.path())
.exec()
.unwrap();
Modules
- Error reporting API.
- Serialization formats for cargo messages.
Structs
- Top-level command.
- The
build
subcommand. - The
run
subcommand (emulated). - CargoTest
test_unstable
Thetest
subcommand (emulated). - Messages returned from a cargo sub-command.
- An individual message from a cargo sub-command.
Constants
- The current process’ target triplet.