Skip to content

Commit ea14862

Browse files
committed
Update proto file and build generated files
1 parent e69e71c commit ea14862

File tree

6 files changed

+112
-2
lines changed

6 files changed

+112
-2
lines changed

lazer/Cargo.lock

Lines changed: 87 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lazer/sdk/proto/publisher_update.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
syntax = "proto3";
22

3+
package pyth_lazer;
4+
35
message PublisherUpdatePayload {
46
repeated PublisherUpdate updates = 1;
57
uint64 batch_timestamp_us = 2;

lazer/sdk/proto/lazer.proto renamed to lazer/sdk/proto/pyth_lazer.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
syntax = "proto3";
22

3+
package pyth_lazer;
4+
35
import "publisher_update.proto";
46

57
enum TransactionSignatureType {

lazer/sdk/rust/protocol/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[package]
22
name = "pyth-lazer-protocol"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2021"
55
description = "Pyth Lazer SDK - protocol types."
66
license = "Apache-2.0"
77
repository = "https://github.com/pyth-network/pyth-crosschain"
8+
build = "build.rs"
89

910
[dependencies]
1011
byteorder = "1.5.0"
@@ -15,6 +16,7 @@ derive_more = { version = "1.0.0", features = ["from"] }
1516
itertools = "0.13.0"
1617
rust_decimal = "1.36.0"
1718
base64 = "0.22.1"
19+
prost = "0.13.5"
1820

1921
[dev-dependencies]
2022
bincode = "1.3.3"
@@ -23,3 +25,6 @@ hex = "0.4.3"
2325
libsecp256k1 = "0.7.1"
2426
bs58 = "0.5.1"
2527
alloy-primitives = "0.8.19"
28+
29+
[build-dependencies]
30+
prost-build = "0.13.5"

lazer/sdk/rust/protocol/build.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use std::io::Result;
2+
3+
fn main() -> Result<()> {
4+
let proto_files = vec![
5+
"../../proto/pyth_lazer.proto",
6+
"../../proto/publisher_update.proto",
7+
];
8+
9+
prost_build::compile_protos(&proto_files, &["../../proto"])?;
10+
11+
Ok(())
12+
}

lazer/sdk/rust/protocol/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ pub mod binary_update;
55
pub mod message;
66
pub mod payload;
77
pub mod publisher;
8+
pub mod pyth_lazer {
9+
include!(concat!(env!("OUT_DIR"), "/pyth_lazer.rs"));
10+
}
811
pub mod router;
912
mod serde_price_as_i64;
1013
mod serde_str;

0 commit comments

Comments
 (0)