[CARGO] config changed?


As a newbie I tested the hello_world program successfully
Then I downloaded a new program to test it.
I could not build it, perhaps due to bad name in the crates…

…\projects\stm32.rs-master>cargo test
Updating git repository https://github.com/hackndev/rust-libcore.git
Updating git repository https://github.com/mokus0/zinc
Updating git repository https://github.com/mokus0/arm_embedded_rt.git
no matching package named core found (required by stm32)
location searched: https://github.com/hackndev/rust-libcore.git
version required: *

My problem is that now, even the former project no more work :

C:\Users\FPIPON\projects\hello_world>cargo test
Unable to update file:///C:/path/to/override

Why project interfere each other ?
How can I solve this ?

Best Regards


What is in the hello world’s Cargo.toml?


Hello Steve
Cargo.toml :


name = "hello_world"
version = "0.0.1"
authors = [ “Hervé PIPON pipon@aximum.fr” ]


This seems weird, how did you install Rust? Which version are you using? Did you modify the .cargo/config file?


Hello Matthieu
I downloaded the msi from the web site.
My Rust version is stable MSVC 1.8 : rustc 1.8.0 (db2939409 2016-04-11)

I add my proxy settings in the config file and I suppressed some lines (supposed unused):

# An array of paths to local repositories which are to be used as overrides for
# dependencies. For more information see the Cargo Guide.
paths = ["/path/to/override"]

# This is your name/email to place in the `authors` section of a new Cargo.toml
# that is generated. If not present, then `git` will be probed, and if that is
# not present then `$USER` and `$EMAIL` will be used.
name = "Hervé PIPON"
email = "pipon@aximum.fr"

# By default `cargo new` will initialize a new git repository. This key can be
# set to `none` to disable this behavior.
vcs = "none"

proxy = ""     # HTTP proxy to use for HTTP requests (defaults to none)
timeout = 60000   # Timeout for each HTTP request, in milliseconds

jobs = 1                  # number of jobs to run by default (default to # cpus)
rustc = "rustc"           # the rust compiler tool
rustdoc = "rustdoc"       # the doc generator tool
target = "triple"         # build for the target triple
target-dir = "target"     # path of where to place all generated artifacts
rustflags = ["..", ".."]  # custom flags to pass to all compiler invocations

verbose = false        # whether cargo provides verbose output
color = 'auto'         # whether cargo colorizes output

# Network configuration
retry = 2 # number of times a network call will automatically retried


I edited your post to properly highlight it, check it out :slight_smile:

So, here’s your problem:

paths = ["/path/to/override"]

This isn’t a valid path, I am assuming. And that’s what the error says.


I agree. Also in my experience you (very) rarely need to edit Cargo’s config file, in my case I only did so recently to set up cross-compiling, and even then it was just for convenience rather than strictly necessary.

In your config, I advise you to remove entries unless you know what they’re doing. For instance, in the target="triple" line, the triple parameter should be replaced by a valid target, as in target=arm-unknown-linux-gnueabihf. Same goes for target-dir, rustflags, etc. which in this example all have dummy values meant to be replaced.

Did you need to edit the configuration because of the proxy?


Yes I had to use this proxy, so I changed the config file.
First I only changed these lines but got some errors : I then removed all lines causing errors.

What is strange is that with this config file, the hello_world project was compiling and run correctly at first.
It’s only when I tried stm32.rs-master that the error appeared on hello_world.

Thank you to both of you for your help