def METHOD_NAME(args, mode='inplace'):
    full_args = ['-r', mode] + args + [
            '--', 'src/lib.rs', '--crate-type=dylib',
            '--crate-name=json_c',
            '-L{rust_libdir}/rustlib/{triple}/lib/'.format(
                rust_libdir=get_rust_toolchain_libpath(),
                triple=get_host_triplet())]
    ld_lib_path = get_rust_toolchain_libpath()
    # don't overwrite existing ld lib path if any...
    if 'LD_LIBRARY_PATH' in local.env:
        ld_lib_path += ':' + local.env['LD_LIBRARY_PATH']
    # import ast
    with local.env(RUST_BACKTRACE='1',
                   LD_LIBRARY_PATH=ld_lib_path):
        with local.cwd(os.path.join(JSON_C_DIR, 'rust')):
            refactor[full_args]()