seacan
A library for interacting with cargo to build things.
The main entrypoints are [bin::Compiler
] and [test::Compiler
].
Binaries and examples
Building binaries and examples is relatively simple, although we do use regexes to give you nicer errors in a few cases.
use bin;
let binary_artifact = bin.release.compile?;
let example_artifact = example.compile?;
Example return value:
Ok
Tests
Building tests is a bit more complicated. We expose all of Cargo's api for specifying which test artifacts to build. After we build each artifact we ask it for a list of all the test or benchmark functions in it that match the spec you provided.
use test;
let mut artifacts = new.compile?;
Example return value:
Ok
Only the default test runner (libtest
) is supported.
Why the name?
A Sea Can is another word for a shipping container. Shipping containers were invented to provide a standard interface around handling cargo.