media_device/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pub extern crate x_variant as variant;

mod base;
pub mod camera;

pub use base::*;
use cfg_if::cfg_if;

cfg_if! {
    if #[cfg(any(target_os = "ios", target_os = "macos"))] {
        #[path = "mac/mod.rs"]
        pub mod backend;
    } else if #[cfg(target_os = "windows")] {
        #[path = "windows/mod.rs"]
        pub mod backend;
    } else if #[cfg(target_family = "wasm")] {
        #[path = "web/mod.rs"]
        pub mod backend;
    } else {
        compile_error!("unsupported target");
    }
}