fix auth issues

This commit is contained in:
Maple Nebel 2026-07-14 23:18:43 +02:00
commit 44d00a3fd1
20 changed files with 88 additions and 27 deletions

View file

@ -6,7 +6,6 @@ edition = "2024"
[dependencies]
bytemuck = { version = "1.25.0", features = ["derive"] }
thiserror = "2.0.18"
tracing = "0.1.44"
v-byte-helpers = { git = "https://github.com/RusticMaple/VByteMacros", version = "0.1.1" }
rnex-util = { path = "../rnex-util" }
tokio = { version = "1.52.3", features = ["sync", "io-util", "rt", "macros", "time"] }
@ -15,6 +14,7 @@ rnex-rmc-macros = { path = "./macros" }
paste = "1.0.15"
rand = "0.10.2"
hex = "0.4.3"
tracing.workspace = true
[features]
splatoon = ["v3-5-0"]
@ -23,7 +23,7 @@ database-support = []
nx = []
third-notif-param = []
v3-3-2 = []
v3-4-0 = ["v3-3-2", "third-notif-param"]
v3-4-0 = ["v3-3-2", "third-notif-param", "rmc_struct_header"]
v3-5-0 = ["v3-4-0"]
v3-8-15 = ["v3-5-0"]
v3-10-22 = ["v3-8-15"]

View file

@ -223,6 +223,7 @@ impl RmcProtocolData {
quote! {
#[inline(always)]
#attribs
#[::rnex_rmc::tracing::instrument]
async fn #raw_name (&self, data: &[u8]) #optional_return{
let mut cursor = ::std::io::Cursor::new(data);
#deser_params
@ -303,12 +304,12 @@ impl RmcProtocolData {
quote! {
#[allow(unused_must_use)]
#[automatically_derived]
pub trait #raw_name: #name{
pub trait #raw_name: #name + ::std::fmt::Debug{
#proto_raw_methods
#rmc_call_proto
}
#[automatically_derived]
impl<T: #name> #raw_name for T{}
impl<T: #name + ::std::fmt::Debug> #raw_name for T{}
}
.to_token_stream()
}

View file

@ -11,7 +11,10 @@ use std::{collections::HashMap, fmt::Debug, io::Cursor, ops::Deref, sync::Arc, t
pub use rand;
pub use rnex_rmc_macros::*;
use rnex_util::{SendingBufferConnection, SplittableBufferConnection, result::ResultExtension};
use rnex_util::{
SendingBufferConnection, SplittableBufferConnection, result::ResultExtension,
tracing::Instrument,
};
use tokio::{
sync::{Mutex, Notify},
task,
@ -322,6 +325,7 @@ impl<T: RemoteDisconnectable> RmcCallable for OnlyRemote<T> {
}
}
#[instrument]
async fn handle_incoming<T: RmcCallable + Send + Sync + Debug + 'static>(
sending_conn: SendingBufferConnection,
remote: Arc<T>,

View file

@ -10,7 +10,7 @@ pub const ERROR_MASK: u32 = 1 << 31;
#[derive(Pod, Zeroable, Copy, Clone, Debug)]
#[repr(transparent)]
pub struct QResult(u32);
pub struct QResult(pub u32);
impl QResult {
pub fn success(error_code: ErrorCode) -> Self {

View file

@ -1,5 +1,5 @@
use std::{
fmt,
fmt::{self, Debug},
io::{self, Read, Write},
string::FromUtf8Error,
};

View file

@ -1,5 +1,6 @@
use std::{
collections::HashSet,
fmt::Debug,
hash::Hash,
io::{Read, Write},
str::FromStr,
@ -9,11 +10,11 @@ use std::{
use crate::serialization::{Error, Result, RmcSerialize};
#[derive(Debug, Clone)]
pub struct StringSet<T: FromStr + ToString + Eq>(pub HashSet<T>)
pub struct StringSet<T: FromStr + ToString + Eq + Debug>(pub HashSet<T>)
where
<T as FromStr>::Err: std::error::Error + Send + Sync + 'static;
impl<T: FromStr + ToString + Eq + Hash> PartialEq for StringSet<T>
impl<T: FromStr + ToString + Eq + Hash + Debug> PartialEq for StringSet<T>
where
<T as FromStr>::Err: std::error::Error + Send + Sync + 'static,
{
@ -22,7 +23,7 @@ where
}
}
impl<T: FromStr + ToString + Eq + Hash> ToString for StringSet<T>
impl<T: FromStr + ToString + Eq + Hash + Debug> ToString for StringSet<T>
where
<T as FromStr>::Err: std::error::Error + Send + Sync + 'static,
{
@ -35,7 +36,7 @@ where
}
}
impl<T: FromStr + ToString + Eq + Hash> FromStr for StringSet<T>
impl<T: FromStr + ToString + Eq + Hash + Debug> FromStr for StringSet<T>
where
<T as FromStr>::Err: std::error::Error + Send + Sync + 'static,
{
@ -57,7 +58,7 @@ where
}
}
impl<T: FromStr + ToString + Eq + Hash> RmcSerialize for StringSet<T>
impl<T: FromStr + ToString + Eq + Hash + Debug> RmcSerialize for StringSet<T>
where
<T as FromStr>::Err: std::error::Error + Send + Sync + 'static,
{