Wondering if anyone might have some advise on some new errors I've never seen before attempting to compile a rust sample for getting started with postgres.
Background is that I'm trying to become familiar with integrating the postgres driver using JSON. I have a simple hello world example working fine, but in order to use the specialized postgres JSON types requires additional hurdles. And so I'm having a go at this tutorial page: Postgres Example
This article seems to dive into integrating specialized postgres types with Rust, however when I try to compile the first sample I'm hitting an obstacle compiling the postgres_macro crate dependency.
Here's my Cargo.toml
[package]
name = "day11"
version = "0.1.0"
edition = "2018"
[dependencies]
postgres = "0.19.2"
postgres_macros = "0.1.13"
rustc-serialize = "0.3.24"
time = "0.3.3"
postgres_array = "0.11.0"
Here's the cargo build error output:
argo build
Updating crates.io index
Compiling postgres_macros v0.1.13
error[E0462]: found staticlib `rustc` instead of rlib or dylib
--> /home/chris/.cargo/registry/src/github.com-1ecc6299db9ec823/postgres_macros-0.1.13/src/lib.rs:4:1
|
4 | extern crate rustc;
| ^^^^^^^^^^^^^^^^^^^
|
= help: please recompile that crate using --crate-type lib
= note: the following crate versions were found:
crate `rustc`: /home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-stable_rt.asan.a
crate `rustc`: /home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-stable_rt.tsan.a
crate `rustc`: /home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-stable_rt.lsan.a
crate `rustc`: /home/chris/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-stable_rt.msan.a
error: could not compile `postgres_macros` due to previous error
Is there something I need to drop into the Cargo.toml to request that postgres_macros be compiled as a lib?