open-coroutine 0.4.1

The open-coroutine is a simple, efficient and generic stackful-coroutine library.
Documentation
use std::env;
use std::path::PathBuf;

fn main() {
    //copy dylib to deps
    let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
    let deps = out_dir
        .parent()
        .unwrap()
        .parent()
        .unwrap()
        .parent()
        .unwrap()
        .join("deps");
    let pattern = deps.to_str().unwrap().to_owned() + "/libopen_coroutine_hooks*.*";
    println!("pattern is {}", pattern);
    for path in glob::glob(&pattern)
        .expect("Failed to read glob pattern")
        .flatten()
    {
        if cfg!(target_os = "linux") {
            std::fs::rename(path, deps.join("libopen_coroutine_hooks.so"))
                .expect("rename to libopen_coroutine_hooks.so failed!")
        } else if cfg!(target_os = "macos") {
            std::fs::rename(path, deps.join("libopen_coroutine_hooks.dylib"))
                .expect("rename to libopen_coroutine_hooks.dylib failed!")
        }
    }
    //link hook dylib
    println!("cargo:rustc-link-lib=dylib=open_coroutine_hooks");
}