"could not rename crate" 在 Windows 上编译 rustless 的基本示例时

"could not rename crate" when compiling a basic example of rustless on Windows

我正在尝试在 Windows 上构建 rustless

这是我的 Cargo.toml:

[dependencies.rustless]
git = "https://github.com/rustless/rustless"

[package]

name = "ccampo_substancias_srv"
version = "0.0.1"
authors = [ "------------------------------" ]

[[bin]]

name = "Rest_test"

这是main.rs:

#![feature(plugin)]

#[plugin]
extern crate rustless;
extern crate hyper;
extern crate iron;
extern crate "rustc-serialize" as rustc_serialize;
extern crate valico;

use hyper::status::StatusCode;
use iron::Iron;
use rustless::{
    Application, Api, Nesting, Versioning
};
use rustc_serialize::json::ToJson;

fn main() {

    let api = Api::build(dsl!(|api| {
        // Specify API version
        version("v1", Versioning::AcceptHeader("chat"));
        prefix("api");

        // Create API for chats
        mount(Api::build(dsl!(|chats_api| {

            after(|client, _params| {
                client.set_status(StatusCode::NotFound);
                Ok(())
            });

            // Add namespace
            namespace("chats/:id", dsl!(|chat_ns| {

                // Valico settings for this namespace
                params(|params| {
                    params.req_typed("id", valico::u64())
                });

                // Create endpoint for POST /chats/:id/users/:user_id
                post("users/:user_id", dsl!(|endpoint| {

                    // Add description
                    desc("Update user");

                    // Valico settings for endpoint params
                    params(|params| {
                        params.req_typed("user_id", valico::u64());
                        params.req_typed("name", valico::string())
                    });

                    handle(|client, params| {
                        client.json(&params.to_json())
                    })
                }));

            }));
        })));
    }));

    let app = Application::new(api);

    Iron::new(app).listen("localhost:4000").unwrap();
    println!("On 4000");

    println!("Rustless server started!");
}

在 Windows 10 上使用 "cargo build --verbose" 和 rust 1.5(64 位)构建。 这是我收到的错误,看起来它与某些文件路径有关:

 Fresh jsonway v0.3.5

 Fresh conduit-mime-types v0.7.3

 Fresh winapi v0.2.5

 Build failed, waiting for other jobs to finish...

 could not rename crate "C:\Users\Pedro\workspace\ccampo-substancias-srv\target\debug\build\advapi32-sys-cfef7a1f30f1e5f6\build_script_build.exe"

Caused by:   Acesso negado. (os error 5)

您的计算机上有 antivirus/anti-malware 软件吗?它可能会尝试分析您的程序,锁定文件。尝试暂时禁用它或在您的项目目录中添加一个例外,然后再次尝试构建。