Open duncanrhamill opened 1 month ago
The code you provide looks good to me. I do something similar and that works as expected. This feels to me that you are importing the wrong struct Timestamp
. As you had already discovered prost_types::Timestamp
already implements trait Message
. https://docs.rs/prost-types/latest/prost_types/struct.Timestamp.html#impl-Message-for-Timestamp
Hello, I'm trying to use prost with a proto file that includes
google.protobuf.Timestamp
like so:I'm using prost-build with the following build script:
With these versions in my
Cargo.toml
:However when I try to build I get the following error messages:
This is with both rust
1.81
and1.77.2
, on Windows 10. I have tried usingprost-wkt-types
, setting thecompile_well_known_types
flag in theprost_build::Config
, and setting variousextern_path
values to try and map the types correctly. What is frustrating is that I can see the#[derive(..., ::prost::Message)]
on my instance of theTimestamp
struct in the cargo registry!Does anyone know how to fix this issue?