fusible 0.20.9

Electronic linter: a fuse that blows to block firmware code generation
1
2
3
4
5
6
7
8
9
10
11
12
use std::path::Path;

const STUDIO_BUNDLE: &str = "src/assets/studio.bundle.js";

/// Enables the `studio_bundle` cfg when the bun-built studio bundle exists, so release builds embed it.
fn main() {
    println!("cargo::rustc-check-cfg=cfg(studio_bundle)");
    println!("cargo::rerun-if-changed={STUDIO_BUNDLE}");
    if Path::new(STUDIO_BUNDLE).exists() {
        println!("cargo::rustc-cfg=studio_bundle");
    }
}