feat: finished zero-copy migration!

now the entire networking and persistence stack is zero-copy with
single-allocation, single-copy reads.

Closes #128

Signed-off-by: Sienna Meridian Satterwhite <sienna@r3t.io>
This commit is contained in:
2025-12-17 21:45:46 +00:00
parent bb4393bb9e
commit 9c19fc0296
14 changed files with 106 additions and 81 deletions

View File

@@ -128,12 +128,12 @@ impl Default for NetworkingConfig {
/// .run();
/// ```
#[derive(Resource, Clone)]
pub struct SessionSecret(Vec<u8>);
pub struct SessionSecret(bytes::Bytes);
impl SessionSecret {
/// Create a new session secret from bytes
pub fn new(secret: impl Into<Vec<u8>>) -> Self {
Self(secret.into())
Self(bytes::Bytes::from(secret.into()))
}
/// Get the secret as a byte slice