Sha256: de4a91d1d252295e1abaf4ab1f90f7be618c67649edb12081c3a501e61398a75

Contents?: true

Size: 510 Bytes

Versions: 7

Compression:

Stored size: 510 Bytes

Contents

/// Generating build depfiles from parsed bindings.
use std::{collections::BTreeSet, path::PathBuf};

#[derive(Debug)]
pub(crate) struct DepfileSpec {
    pub output_module: String,
    pub depfile_path: PathBuf,
}

impl DepfileSpec {
    pub fn write(&self, deps: &BTreeSet<String>) -> std::io::Result<()> {
        let mut buf = format!("{}:", self.output_module);

        for file in deps {
            buf = format!("{} {}", buf, file);
        }

        std::fs::write(&self.depfile_path, &buf)
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wasmtime-8.0.0 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs
wasmtime-7.0.0 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs
wasmtime-6.0.1 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs
wasmtime-6.0.0 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs
wasmtime-5.0.0 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs
wasmtime-0.4.1 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs
wasmtime-0.4.0 ./ext/cargo-vendor/bindgen-0.60.1/src/deps.rs