dioxus-clerk 0.6.0

Clerk integration for Dioxus: components, hooks, and SSR initial state for web and fullstack apps
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Emits the `clerk_client` cfg alias: true when compiling for the browser
//! client (wasm32 without the `worker` feature), where clerk-js is reachable.
//! Use `#[cfg(clerk_client)]` / `#[cfg(not(clerk_client))]` instead of
//! repeating `all(target_arch = "wasm32", not(feature = "worker"))`.

fn main() {
    println!("cargo::rustc-check-cfg=cfg(clerk_client)");

    let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
    let worker = std::env::var("CARGO_FEATURE_WORKER").is_ok();
    if target_arch == "wasm32" && !worker {
        println!("cargo::rustc-cfg=clerk_client");
    }
}