Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ restate-metadata-store = { path = "crates/metadata-store" }
restate-node = { path = "crates/node" }
restate-object-store-util = { path = "crates/object-store-util" }
restate-partition-store = { path = "crates/partition-store" }
restate-platform = { path = "crates/platform" }
restate-queue = { path = "crates/queue" }
restate-rocksdb = { path = "crates/rocksdb" }
restate-serde-util = { path = "crates/serde-util" }
Expand All @@ -95,6 +96,7 @@ restate-utoipa = { path = "crates/utoipa" }
restate-vqueues = { path = "crates/vqueues" }
restate-wal-protocol = { path = "crates/wal-protocol" }
restate-worker = { path = "crates/worker" }
restate-worker-api = { path = "crates/worker-api" }
restate-ingestion-client = { path = "crates/ingestion-client" }
restate-limiter = { path = "crates/limiter" }

Expand Down
3 changes: 2 additions & 1 deletion crates/clock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ test-util = []

[dependencies]
restate-workspace-hack = { workspace = true }
restate-encoding = { workspace = true }

restate-platform = { workspace = true }

bilrost = { workspace = true }
jiff = { workspace = true, optional = true }
Expand Down
4 changes: 3 additions & 1 deletion crates/clock/src/rough_ts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ use std::num::NonZeroU32;
use std::ops::{Add, Sub};
use std::time::Duration;

use restate_platform::network::NetSerde;

use crate::WallClock;
use crate::time::MillisSinceEpoch;
use crate::unique_timestamp::UniqueTimestamp;
Expand Down Expand Up @@ -45,7 +47,7 @@ impl fmt::Debug for RoughTimestamp {
}
}

impl restate_encoding::NetSerde for RoughTimestamp {}
impl NetSerde for RoughTimestamp {}

const _: () = {
assert!(
Expand Down
6 changes: 4 additions & 2 deletions crates/clock/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ use std::time::{Duration, SystemTime};
// Note: BilrostNewType and NetSerde derives are not used since both MillisSinceEpoch
// and NanosSinceEpoch have custom implementations for niche optimization.

use restate_platform::network::NetSerde;

use crate::WallClock;

/// Milliseconds since the unix epoch.
Expand Down Expand Up @@ -46,7 +48,7 @@ impl fmt::Debug for MillisSinceEpoch {
}
}

impl restate_encoding::NetSerde for MillisSinceEpoch {}
impl NetSerde for MillisSinceEpoch {}

// Static assertions to ensure that MillisSinceEpoch is the same size as u64
// and that niche optimization works.
Expand Down Expand Up @@ -376,7 +378,7 @@ impl fmt::Debug for NanosSinceEpoch {
}
}

impl restate_encoding::NetSerde for NanosSinceEpoch {}
impl NetSerde for NanosSinceEpoch {}

// Static assertions to ensure that NanosSinceEpoch is the same size as u64
// and that niche optimization works.
Expand Down
1 change: 1 addition & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ restate-core-derive = { workspace = true, optional = true }
restate-futures-util = { workspace = true }
restate-memory = { workspace = true }
restate-metadata-store = { workspace = true }
restate-platform = { workspace = true }
restate-time-util = { workspace = true }
restate-types = { workspace = true }

Expand Down
1 change: 0 additions & 1 deletion crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub mod network;
pub mod partitions;
pub mod protobuf;
pub mod task_center;
pub mod worker_api;
pub use error::*;

/// Run tests within task-center
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/network/incoming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::marker::PhantomData;
use bytes::Bytes;
use tokio::sync::{oneshot, watch};

use restate_memory::EstimatedMemorySize;
use restate_platform::memory::EstimatedMemorySize;

pub use restate_memory::MemoryLease;
use restate_types::GenerationalNodeId;
Expand Down
3 changes: 2 additions & 1 deletion crates/core/src/network/message_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ use tokio::sync::{mpsc, oneshot, watch};
use tokio_stream::StreamExt;
use tracing::{debug, instrument, trace, warn};

use restate_memory::{EstimatedMemorySize, MemoryLease, MemoryPool};
use restate_memory::{MemoryLease, MemoryPool};
use restate_platform::memory::EstimatedMemorySize;
use restate_types::SharedString;
use restate_types::net::{Service, ServiceTag};

Expand Down
5 changes: 1 addition & 4 deletions crates/encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ publish = false
restate-workspace-hack = { workspace = true }

restate-encoding-derive = { version = "0.1.0", path = "derive" }
restate-sharding = { workspace = true }
restate-platform = { workspace = true }

bilrost = { workspace = true }
bytes = { workspace = true }
bytestring = { workspace = true }

[dev-dependencies]
rand = { workspace = true }
restate-sharding = { workspace = true, features = ["bilrost"] }
static_assertions = { workspace = true }
4 changes: 2 additions & 2 deletions crates/encoding/derive/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ pub fn net_serde_inner(input: DeriveInput) -> Result<TokenStream, syn::Error> {

let where_clauses = field_types.iter().map(|ty| {
quote! {
#ty: NetSerde
#ty: ::restate_platform::network::NetSerde
}
});

let expanded = quote! {
impl ::restate_encoding::NetSerde for #name where #(#where_clauses),* {}
impl ::restate_platform::network::NetSerde for #name where #(#where_clauses),* {}
};

Ok(TokenStream::from(expanded))
Expand Down
3 changes: 2 additions & 1 deletion crates/encoding/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ use bilrost::{
encoding::{EmptyState, ForOverwrite, Proxiable},
};
use restate_encoding_derive::BilrostNewType;
use restate_platform::network::NetSerde;

use crate::{NetSerde, bilrost_encodings::RestateEncoding};
use crate::bilrost_encodings::RestateEncoding;

struct U128Tag;

Expand Down
Loading
Loading