Expand description
This module implements Cargo conventions for directory layout:
src/lib.rs
is a librarysrc/main.rs
is a binarysrc/bin/*.rs
are binariesexamples/*.rs
are examplestests/*.rs
are integration testsbenches/*.rs
are benchmarks
It is a bit tricky because we need match explicit information from Cargo.toml
with implicit info in directory layout.
Constants§
- DEFAULT_
BENCH_ 🔒DIR_ NAME - DEFAULT_
EXAMPLE_ 🔒DIR_ NAME - DEFAULT_
TEST_ 🔒DIR_ NAME - TARGET_
KIND_ 🔒BENCH - TARGET_
KIND_ 🔒BIN - TARGET_
KIND_ 🔒EXAMPLE - TARGET_
KIND_ 🔒HUMAN_ BENCH - TARGET_
KIND_ 🔒HUMAN_ BIN - TARGET_
KIND_ 🔒HUMAN_ EXAMPLE - TARGET_
KIND_ 🔒HUMAN_ LIB - TARGET_
KIND_ 🔒HUMAN_ TEST - TARGET_
KIND_ 🔒LIB - TARGET_
KIND_ 🔒TEST
Functions§
- are_
normalized 🔒 - are_
normalized_ 🔒 - configure 🔒
- infer_
any 🔒 - infer_
file 🔒 - infer_
from_ 🔒directory - infer_
subdirectory 🔒 - inferred_
bins 🔒 - inferred_
lib 🔒 - inferred_
to_ 🔒toml_ targets - is_
normalized 🔒 - is_
not_ 🔒dotfile - legacy_
bin_ 🔒path - name_
or_ 🔒panic - normalize_
benches - normalize_
bins - normalize_
build - Returns the path to the build script if one exists for this crate.
- normalize_
examples - normalize_
lib - normalize_
targets 🔒 - normalize_
targets_ 🔒with_ legacy_ path - normalize_
tests - target_
path 🔒 - target_
path_ 🔒not_ found_ error_ message - Build an error message for a target path that cannot be determined either by auto-discovery or specifying.
- to_
bench_ 🔒targets - to_
bin_ 🔒targets - to_
example_ 🔒targets - to_
lib_ 🔒target - to_
targets 🔒 - to_
test_ 🔒targets - toml_
targets_ 🔒and_ inferred - validate_
bin_ 🔒crate_ types - validate_
bin_ 🔒name - validate_
bin_ 🔒proc_ macro - validate_
crate_ 🔒types - validate_
lib_ 🔒name - validate_
proc_ 🔒macro - validate_
target_ 🔒name - validate_
unique_ 🔒names - Will check a list of toml targets, and make sure the target names are unique within a vector.