0

I have this in Cargo.toml

[dependencies.postgres]

git = "https://github.com/sfackler/rust-postgres.git"

This resulted in the following output, when running cargo build:

$ cargo build -u
    Updating git repository `https://github.com/sfackler/rust-postgres.git`
No package named `postgres` found (required by `hello-world`).
Location searched: https://github.com/sfackler/rust-postgres.git
Version required: *

What am I missing here?

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
bojangle
  • 888
  • 1
  • 8
  • 14

1 Answers1

3

Change [dependencies.postgres] [dependencies.rust-postgres]

The reason for this is: Cargo.toml of that package is defines the package name as rust-postgres, and this needs to match.

Note however, that it also defines the name of its lib as just postgres. So you would do extern crate postgres;(not extern crate rust-postgres;)

bguiz
  • 27,371
  • 47
  • 154
  • 243