wasm_or_native_expr

Macro wasm_or_native_expr 

Source
macro_rules! wasm_or_native_expr {
    (wasm => $wasm_expr:expr, native => $native_expr:expr $(,)?) => { ... };
    (native => $native_expr:expr, wasm => $wasm_expr:expr $(,)?) => { ... };
}
Expand description

Convenience macro to easily evaluate an expression for wasm or native

§Example

let path = wasm_or_native_expr! {
    wasm => "wasm".to_string(),
    native => "native".into(),
};