def build [name?: string, ...args: string] {
    if ("./build.nu" | path exists) {
        if $name == null {
            nu ./build.nu all
        } else {
            nu ./build.nu $name ...$args
        }
    } else if ("./Cargo.toml" | path exists) {
        if $name == null {
            cargo build
        } else if $name == "run" {
            cargo $name -- ...$args
        } else {
            cargo $name ...$args
        }
    } else if ("./Makefile" | path exists) {
        if $name == null {
            make
        } else {
            make $name ...$args
        }
    }
}