matrix-sdk-common 0.7.0

Collection of common types and imports used in the matrix-sdk
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{env, process};

fn main() {
    let is_wasm = env::var_os("CARGO_CFG_TARGET_ARCH").is_some_and(|arch| arch == "wasm32");
    if is_wasm && env::var_os("CARGO_FEATURE_JS").is_none() {
        eprintln!(
            "\n\
            ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n\
            ┃ error: matrix-sdk currently requires a JavaScript environment for WASM. ┃\n\
            ┃        Please activate the `js` Cargo feature if this is what you want. ┃\n\
            ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n\
            ",
        );
        process::exit(1);
    };
}