Crates.io | prost-uuid-doubleint |
lib.rs | prost-uuid-doubleint |
version | 0.1.1 |
source | src |
created_at | 2024-07-17 12:32:10.398877 |
updated_at | 2024-07-17 13:21:23.186636 |
description | Prost uuid custom datatype |
homepage | |
repository | https://github.com/evilbluebeaver/prost_uuid_doubleint |
max_upload_size | |
id | 1306157 |
size | 4,499 |
Custom uuid type for using in protobuf .proto files.
Represents uuid as 2 u64 integers.
You need to have a file with Uuid
syntax = "proto3";
package uuid;
message Uuid {
uint64 high = 1;
uint64 low = 2;
}
and import it from another .proto file
syntax = "proto3";
package user;
import "uuid.proto";
message User {
uuid.Uuid id = 1;
string name = 2;
}
...
[dependencies]
prost = "0.13"
prost-uuid-doubleint = "0.1.0"
...
...
prost_build::Config::new()
.extern_path(".uuid.Uuid", "::prost_uuid_doubleint::ProstUuid")
.compile_protos(&["./proto/user.proto"], &["./proto"])
...