lib.rs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 time;
  28. extern crate tempfile;
  29. extern crate url;
  30. #[macro_use]
  31. extern crate log;
  32. #[cfg(not(feature = "with-tremor"))]
  33. extern crate vorbis;
  34. #[cfg(feature = "with-tremor")]
  35. extern crate tremor as vorbis;
  36. #[cfg(feature = "openssl")]
  37. extern crate openssl;
  38. #[cfg(feature = "portaudio")]
  39. extern crate portaudio;
  40. #[cfg(feature = "libpulse-sys")]
  41. extern crate libpulse_sys;
  42. extern crate librespot_protocol as protocol;
  43. // include!/include_bytes! don't play nice with syntex, so place these here
  44. pub mod version {
  45. include!(concat!(env!("OUT_DIR"), "/version.rs"));
  46. pub fn version_string() -> String {
  47. format!("librespot-{}", short_sha())
  48. }
  49. }
  50. #[cfg(feature = "with-syntex")]
  51. include!(concat!(env!("OUT_DIR"), "/lib.rs"));
  52. #[cfg(not(feature = "with-syntex"))]
  53. include!("lib.in.rs");