mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Switch to ewext for connection between noita and the proxy.
This commit is contained in:
parent
7b34f77b68
commit
75d39b2ca5
12 changed files with 713 additions and 121 deletions
7
shared/Cargo.toml
Normal file
7
shared/Cargo.toml
Normal 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
37
shared/src/lib.rs
Normal 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>),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue