Switch to ewext for connection between noita and the proxy.

This commit is contained in:
IQuant 2024-11-29 21:35:18 +03:00
parent 7b34f77b68
commit 75d39b2ca5
12 changed files with 713 additions and 121 deletions

7
shared/Cargo.toml Normal file
View file

@ -0,0 +1,7 @@
[package]
name = "shared"
version = "0.1.0"
edition = "2021"
[dependencies]
bitcode = "0.6.3"

37
shared/src/lib.rs Normal file
View file

@ -0,0 +1,37 @@
use bitcode::{Decode, Encode};
#[derive(Encode, Decode)]
pub struct PeerId(pub u64);
#[derive(Encode, Decode)]
pub struct ProxyKV {
pub key: String,
pub value: String,
}
#[derive(Encode, Decode)]
pub struct ProxyKVBin {
pub key: u8,
pub value: Vec<u8>,
}
#[derive(Encode, Decode)]
pub struct ModMessage {
pub peer: PeerId,
pub value: Vec<u8>,
}
#[derive(Encode, Decode)]
pub enum NoitaInbound {
// ProxyKV(ProxyKV),
// ProxyKVBin(ProxyKVBin),
// ModMessage(ModMessage),
RawMessage(Vec<u8>),
Ready,
}
#[derive(Encode, Decode)]
pub enum NoitaOutbound {
// ModMessage(ModMessage),
Raw(Vec<u8>),
}