media_device/
lib.rs

1#[cfg(feature = "video")]
2pub mod camera;
3
4mod device;
5
6use cfg_if::cfg_if;
7pub use device::*;
8
9cfg_if! {
10    if #[cfg(any(target_os = "ios", target_os = "macos"))] {
11        #[path = "mac/mod.rs"]
12        pub mod backend;
13    } else if #[cfg(target_os = "windows")] {
14        #[path = "windows/mod.rs"]
15        pub mod backend;
16    } else if #[cfg(target_family = "wasm")] {
17        #[path = "web/mod.rs"]
18        pub mod backend;
19    } else {
20        compile_error!("unsupported target");
21    }
22}