esp-storage 0.1.0

Implementation of embedded-storage traits to access unencrypted ESP32 flash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn main() -> Result<(), String> {
    if cfg!(feature = "esp32") {
        match std::env::var("OPT_LEVEL") {
            Ok(level) => {
                if level != "2" && level != "3" {
                    Err(format!("Building esp-storage for ESP32 needs optimization level 2 or 3 - yours is {}. See https://github.com/bjoernQ/esp-storage", level).to_string())
                } else {
                    Ok(())
                }
            }
            Err(_err) => Ok(()),
        }
    } else {
        Ok(())
    }
}