green_copper_runtime/modules/io/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use quickjs_runtime::builder::QuickJsRuntimeBuilder;

#[cfg(any(feature = "all", feature = "io", feature = "gpio"))]
pub mod gpio;

#[cfg(any(feature = "all", feature = "io", feature = "fs"))]
pub mod fs;

pub(crate) fn init(builder: QuickJsRuntimeBuilder) -> QuickJsRuntimeBuilder {
    #[cfg(any(feature = "all", feature = "io", feature = "gpio"))]
    let builder = gpio::init(builder);

    #[cfg(any(feature = "all", feature = "io", feature = "fs"))]
    let builder = fs::init(builder);

    builder
}