Expand description
Embed and access the license notices of a crate’s dependencies.
notalawyer is the runtime core of a three-crate family that lets a binary
display the license notices of every crate it depends on:
notalawyer-buildruns from abuild.rs, gathers the dependency licenses, and writes aNOTICEfile intoOUT_DIR.notalawyer(this crate) provides theinclude_notice!macro, which embeds that generatedNOTICEfile into the binary as a&'static str.notalawyer-clapwires the notice into aclapCLI behind a--license-noticeflag.
This crate has no dependencies and exposes only the include_notice!
macro.
§Example
ⓘ
// The build script (notalawyer-build) wrote a NOTICE file into OUT_DIR.
// `include_notice!` embeds it as a `&'static str` at compile time.
let notice: &'static str = notalawyer::include_notice!();
print!("{notice}");Macros§
- include_
notice - Embed the generated dependency-license
NOTICEfile as a&'static str.