Skip to main content

locode/
lib.rs

1#![doc = include_str!("../README.md")]
2#![no_std]
3
4#[cfg(any(test, feature = "_feat_alloc"))]
5extern crate alloc;
6
7#[cfg(any(test, feature = "_feat_std"))]
8extern crate std;
9
10#[cfg(feature = "feat-iso3166")]
11pub mod iso3166 {
12    //! ISO 3166-1 country codes mapping.
13    //! 
14    //! Enabled with the `feat-iso3166` feature (~350 KiB).
15
16    #[cfg(feature = "feat-build-fresh")]
17    include!(concat!(env!("OUT_DIR"), "/iso3166.rs"));
18
19    #[cfg(not(feature = "feat-build-fresh"))]
20    include!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/iso3166.rs"));
21}
22
23#[cfg(feature = "feat-iata-city")]
24pub mod iata {
25    //! IATA city codes mapping.
26    //! 
27    //! Enabled with the `feat-iata-city` feature (~6 MiB).
28
29    #[cfg(feature = "feat-build-fresh")]
30    include!(concat!(env!("OUT_DIR"), "/iata.rs"));
31
32    #[cfg(not(feature = "feat-build-fresh"))]
33    include!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/iata.rs"));
34}
35
36#[cfg(feature = "feat-iso3166")]
37pub use crate::iso3166::Iso3166;
38
39#[cfg(feature = "feat-iata-city")]
40pub use crate::iata::City as IataCity;