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 == true
to collect.
§Quickstart
-
The upstream crate e.g.
crate foo
callsinwelling::collect_downstream()
in itsbuild.rs
and do whatever it want to generate APIs for downstream. -
The downstream crate e.g.
crate bar
callsinwelling::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§
- Information collected from downstream crates.
- Options passed to inwelling().
- Information collected from one downstream crate. Including:
Functions§
- Collects information from downstream crates. Including:
- Allow the upstream crate to collect information from this crate.