Crate pkg [] [src]

A small utility library for binary applications.

Examples

extern crate pkg;

fn main() {
    println!("{} {}\n{}", pkg::name(), pkg::version(), pkg::description());
}

Cargo features

This crate provides one cargo feature:

  • nightly: This uses language features only available on the nightly release channel for more optimal implementations.

Macros

pkg_authors

Macro for getting the crate authors from the cargo manifest.

pkg_description

Macro for getting the crate description from the cargo manifest.

pkg_homepage

Macro for getting the crate homepage from the cargo manifest.

pkg_name

Macro for getting the crate name from the cargo manifest.

pkg_version

Macro for getting the crate version from the cargo manifest.

Functions

author

Returns the crate author.

authors

Returns a slice reference of the crate authors.

bin_name

Returns the name of the binary file.

description

Returns the crate description.

homepage

Returns the crate homepage.

name

Returns the crate name.

version

Returns the crate version.