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/chiselstrike/api
    
    the code of the file until where you have to start completion: // SPDX-FileCopyrightText: Â© 2022 ChiselStrike <info@chiselstrike.com>

use anyhow::{Context, Result};
use std::env;
use std::fs;
use std::path::PathBuf;
use tsc_compile::compile_ts_code;
use tsc_compile::CompileOptions;

// TODO: maybe we can import all .ts files in just a single invocation of tsc?

async fn compile(stem: &str) -> Result<()> {
    let src = &format!("src/{}.ts", stem);
    println
    
async fn compile(stem: &str) -> Result<()> {
    let src = &format!("src/{}.ts", stem);
    println!("cargo:rerun-if-changed={}", src);

    let opts = CompileOptions {
        emit_declarations: true,
        ..Default::default()
    };
    let mut map = compile_ts_code(&[src], opts)
        .await
        .context(format!("Could not compile {:?}", src))?;
    let code = map.remove(src).unwrap();

    let out = PathBuf::from(env::var_os("OUT_DIR").unwrap());
    let js = format!("{}.js", stem);
    fs::write(&out.join(js), code)?;
    let dts = format!("{}.d.ts", stem);
    let src_dts = &format!("src/{}", dts);
    fs::write(&out.join(dts), map.remove(src_dts).unwrap())?;
    Ok(())
}