Re: [libgpiod][PATCH V10 2/6] bindings: rust: Add libgpiod crate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22-11-22, 13:09, Kent Gibson wrote:
> Which is a library that reads the envvars set by Cargo at compile time,
> so you could also just
> 
> const VERSION: &'static str = env!("CARGO_PKG_VERSION");
> 
> and provide a function that returns that.

Right, this is what we are doing currently:

/// Get the API version of the libgpiod crate as a human-readable string.
pub fn crate_version() -> &'static str {
    env!("CARGO_PKG_VERSION")
}

-- 
viresh



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux