Skip to content

Commit 3413757

Browse files
committed
ci: fix crate publishing issue
1 parent 630bd0f commit 3413757

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ proto:
141141
cargo +{{rust}} clean -p inferadb-ledger-proto
142142
cargo +{{rust}} build -p inferadb-ledger-proto
143143
cp target/debug/build/inferadb-ledger-proto-*/out/ledger.v1.rs crates/proto/src/generated/
144+
cp target/debug/build/inferadb-ledger-proto-*/out/ledger_v1_descriptor.bin crates/proto/src/generated/
144145

145146
# Lint protobuf definitions
146147
proto-lint:
114 KB
Binary file not shown.

crates/proto/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@ pub mod proto {
3030
/// Serialized `FileDescriptorSet` for gRPC reflection.
3131
///
3232
/// Embedded at compile time from the prost-generated descriptor binary.
33-
/// Only available when building from source (not pre-generated code).
33+
/// When building from source, this is generated by the build script.
34+
/// When using pre-generated code (crates.io), this is bundled from `src/generated/`.
3435
#[cfg(not(use_pregenerated_proto))]
3536
pub const FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("ledger_v1_descriptor");
3637

38+
#[cfg(use_pregenerated_proto)]
39+
pub const FILE_DESCRIPTOR_SET: &[u8] =
40+
include_bytes!("generated/ledger_v1_descriptor.bin");
41+
3742
/// Bidirectional conversions between domain and protobuf types.
3843
pub mod convert;

0 commit comments

Comments
 (0)