fledge 1.1.1

Dev lifecycle CLI. One tool for the dev loop, any language.
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    let cargo_toml = std::fs::read_to_string("Cargo.toml").expect("reading Cargo.toml");
    let parsed: toml::Value = cargo_toml.parse().expect("parsing Cargo.toml");
    let wt = &parsed["dependencies"]["wasmtime"];
    let version = wt
        .as_str()
        .or_else(|| wt.get("version").and_then(|v| v.as_str()))
        .expect("wasmtime dependency should have a version (string or table with `version` key)");
    println!("cargo:rustc-env=WASMTIME_DEP_VERSION={version}");
    println!("cargo:rerun-if-changed=Cargo.toml");
}