Skip to content

Commit

Permalink
demo pub function generation
Browse files Browse the repository at this point in the history
  • Loading branch information
danielschemmel committed Mar 8, 2024
1 parent ebf8cd2 commit a2cffbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sample/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// This macro supports visibility-specifiers, like `build_info!(pub fn how_this_crate_was_built)`.
build_info::build_info!(fn build_info);

// The same, but as a public function:
build_info::build_info!(pub fn build_info);

fn main() {
// We can now either use the `build_info` function to work with the collected data at runtime...
println!("{:#?}", build_info());
Expand Down

0 comments on commit a2cffbc

Please sign in to comment.