51 lines
1.6 KiB
Rust
51 lines
1.6 KiB
Rust
|
//! Meta-information of this crate.
|
||
|
|
||
|
macro_rules! meta_str {
|
||
|
($($(#[$outer:meta])* $name:ident = $e:expr;)*) => {
|
||
|
$($(#[$outer])* pub const fn $name() -> &'static str {$e})*
|
||
|
|
||
|
pub mod ffi
|
||
|
{
|
||
|
$(
|
||
|
doc_comment! {
|
||
|
concat!("FFI variant of [`",
|
||
|
stringify!($name),
|
||
|
"`]\n\n[`",
|
||
|
stringify!($name),
|
||
|
"`]: ../fn.",
|
||
|
stringify!($name),
|
||
|
".html"),
|
||
|
pub const fn $name() -> crate::ffi::NT {c_str!($e)}
|
||
|
}
|
||
|
)*
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
meta_str!(
|
||
|
/// The authors of this crate, `:` separated.
|
||
|
authors = env!("CARGO_PKG_AUTHORS");
|
||
|
/// The description of this crate.
|
||
|
description = env!("CARGO_PKG_DESCRIPTION");
|
||
|
/// The home page of this crate.
|
||
|
homepage = env!("CARGO_PKG_HOMEPAGE");
|
||
|
/// The full license text of this crate.
|
||
|
license_text = include_str!("../LICENSE");
|
||
|
/// The name of this crate.
|
||
|
name = env!("CARGO_PKG_NAME");
|
||
|
/// The repository of this crate.
|
||
|
repository = env!("CARGO_PKG_REPOSITORY");
|
||
|
/// The full version of this crate.
|
||
|
version = env!("CARGO_PKG_VERSION");
|
||
|
/// The major version of this crate.
|
||
|
version_major = env!("CARGO_PKG_VERSION_MAJOR");
|
||
|
/// The minor version of this crate.
|
||
|
version_minor = env!("CARGO_PKG_VERSION_MINOR");
|
||
|
/// The patch version of this crate.
|
||
|
version_patch = env!("CARGO_PKG_VERSION_PATCH");
|
||
|
/// The pre-release version of this crate.
|
||
|
version_pre = env!("CARGO_PKG_VERSION_PRE");
|
||
|
);
|
||
|
|
||
|
// EOF
|