lib.rs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #![crate_name = "librespot"]
  2. #![cfg_attr(not(feature = "with-syntex"), feature(plugin, custom_derive))]
  3. #![cfg_attr(not(feature = "with-syntex"), plugin(protobuf_macros))]
  4. #![cfg_attr(not(feature = "with-syntex"), plugin(json_macros))]
  5. #![cfg_attr(not(feature = "with-syntex"), plugin(serde_macros))]
  6. #![cfg_attr(feature="clippy", feature(plugin))]
  7. #![cfg_attr(feature="clippy", plugin(clippy))]
  8. #[macro_use]
  9. extern crate lazy_static;
  10. extern crate bit_set;
  11. extern crate byteorder;
  12. extern crate crypto;
  13. extern crate eventual;
  14. extern crate getopts;
  15. extern crate hyper;
  16. extern crate linear_map;
  17. extern crate lmdb_rs;
  18. extern crate mdns;
  19. extern crate num;
  20. extern crate protobuf;
  21. extern crate shannon;
  22. extern crate rand;
  23. extern crate rpassword;
  24. extern crate rustc_serialize;
  25. extern crate serde;
  26. extern crate serde_json;
  27. extern crate tempfile;
  28. extern crate url;
  29. #[macro_use]
  30. extern crate log;
  31. #[cfg(not(feature = "with-tremor"))]
  32. extern crate vorbis;
  33. #[cfg(feature = "with-tremor")]
  34. extern crate tremor as vorbis;
  35. #[cfg(feature = "openssl")]
  36. extern crate openssl;
  37. #[cfg(feature = "portaudio")]
  38. extern crate portaudio;
  39. #[cfg(feature = "libpulse-sys")]
  40. extern crate libpulse_sys;
  41. extern crate librespot_protocol as protocol;
  42. // include!/include_bytes! don't play nice with syntex, so place these here
  43. pub mod version {
  44. include!(concat!(env!("OUT_DIR"), "/version.rs"));
  45. pub fn version_string() -> String {
  46. format!("librespot-{}", short_sha())
  47. }
  48. }
  49. #[cfg(feature = "with-syntex")]
  50. include!(concat!(env!("OUT_DIR"), "/lib.rs"));
  51. #[cfg(not(feature = "with-syntex"))]
  52. include!("lib.in.rs");