You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: build.rs
    path of file: ./repos/cargo-watt/src
    
    the code of the file until where you have to start completion: use crate::{
    utils,
    wasm::{self, ProcMacroFn, ProcMacroKind},
    CompilationOptions,
};
use std::path::{Path, PathBuf};

pub fn build(
    directory: &Path,
    out_dir: Option<PathBuf>,
    compilation_options: &CompilationOptions,
    only_copy_essential: bool,
    overwrite: bool,
    verbose: bool,
) -> Result<(), anyhow::Error> {
    let manifest = utils::parse_validate_toml(&directory.join("Cargo.toml"))?;
    let name = manifest["package"]["name"].as_str().unwrap().to_string();

    let crate_path = out_dir.unwrap_or_else(|| PathBuf::from(format!("{}-watt",
    
fn watt_librs(name: &str, fns: &[ProcMacroFn], compress: bool) -> String {
    let uses_proc_macro_hack = fns.iter().any(|f| f.kind == ProcMacroKind::ProcMacroHack);
    let use_proc_macro_hack = if uses_proc_macro_hack {
        Some(quote::quote! { use proc_macro_hack::proc_macro_hack; })
    } else {
        None
    };

    let mut file_name = format!("{}.wasm", &name);
    if compress {
        file_name.push_str(".deflate");
    }

    let macro_static = if compress {
        quote::quote! {
            extern crate once_cell;

            use once_cell::sync::Lazy;

            static WASM: Lazy<Vec<u8>> = Lazy::new(|| miniz_oxide::inflate::decompress_to_vec(include_bytes!(#file_name)).expect("failed to decomress wasm"));
            static MACRO: Lazy<watt::WasmMacro> = Lazy::new(|| watt::WasmMacro::new(&WASM));
        }
    } else {
        quote::quote! {
            static WASM: &[u8] = include_bytes!(#file_name);
            static MACRO: watt::WasmMacro = watt::WasmMacro::new(WASM);
        }
    };

    let lib = quote::quote! {
        #macro_static
        #use_proc_macro_hack

        #(#fns)*
    };

    lib.to_string()
}