Expand description
§Project Goal
To provide a mechanism for upstream crates to collect information from downstream crates.
§Information collected from downstream crates
Invoking collect_downstream() will collect the following information from
crates which called inwelling::to() in its build.rs.
-
Package name.
-
Metadata defined in
Cargo.toml. -
Manifest paths of
Cargo.toml. -
Source file paths(optional). Call
collect_downstream()with the argumentinwelling::Opt::dump_rs_paths == trueto collect.
§Quickstart
-
The upstream crate e.g.
crate foocallsinwelling::collect_downstream()in itsbuild.rsand do whatever it want to generate APIs for downstream. -
The downstream crate e.g.
crate barcallsinwelling::to()in itsbuild.rs.// build.rs fn main() { inwelling::to( "foo" ); }To send some metadata to upstream
crate foo, encode them inCargo.toml’s package metadata.[package.metadata.inwelling.foo] answer = { type = "integer", value = "42" }
Structs§
- Downstream
- Information collected from downstream crates.
- Opts
- Options passed to inwelling().
- Package
- Information collected from one downstream crate. Including:
Functions§
- collect_
downstream - Collects information from downstream crates. Including:
- to
- Allow the upstream crate to collect information from this crate.