Fix compile with nRPC, bump major version

This commit is contained in:
NGnius (Graham) 2024-04-02 20:52:42 -04:00
parent d23dd404c4
commit b7ed5d1e1c
7 changed files with 23 additions and 19 deletions

12
Cargo.lock generated
View file

@ -794,7 +794,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
[[package]]
name = "nrpc"
version = "0.10.0"
version = "1.0.0"
dependencies = [
"async-trait",
"bytes",
@ -804,7 +804,7 @@ dependencies = [
[[package]]
name = "nrpc-build"
version = "0.10.0"
version = "1.0.0"
dependencies = [
"nrpc",
"prettyplease 0.2.10",
@ -1509,7 +1509,7 @@ dependencies = [
[[package]]
name = "usdpl-back"
version = "0.11.0"
version = "1.0.0"
dependencies = [
"async-lock",
"async-recursion",
@ -1529,7 +1529,7 @@ dependencies = [
[[package]]
name = "usdpl-build"
version = "0.11.0"
version = "1.0.0"
dependencies = [
"nrpc-build",
"prettyplease 0.2.10",
@ -1542,7 +1542,7 @@ dependencies = [
[[package]]
name = "usdpl-core"
version = "0.11.0"
version = "1.0.0"
dependencies = [
"aes-gcm-siv",
"base64",
@ -1551,7 +1551,7 @@ dependencies = [
[[package]]
name = "usdpl-front"
version = "0.11.0"
version = "1.0.0"
dependencies = [
"console_error_panic_hook",
"futures",

View file

@ -1,6 +1,6 @@
[package]
name = "usdpl-back"
version = "0.11.0"
version = "1.0.0"
edition = "2021"
authors = ["NGnius <ngniusness@gmail.com>"]
license = "GPL-3.0-only"
@ -15,12 +15,12 @@ blocking = [] # synchronous API for async functionality, using tokio
#encrypt = ["usdpl-core", "obfstr", "hex"]
[dependencies]
usdpl-core = { version = "0.11", path = "../usdpl-core"}
usdpl-core = { version = "1.0", path = "../usdpl-core"}
log = "0.4"
# gRPC/protobuf
nrpc = { version = "0.10", path = "../../nRPC/nrpc", default-features = false, features = [ "server-send" ] }
nrpc = { version = "1.0", path = "../../nRPC/nrpc", default-features = false, features = [ "server-send", "async-trait" ] }
async-lock = "2.7"
prost = "0.11"
@ -43,4 +43,4 @@ hex = { version = "0.4", optional = true }
gettext-ng = { version = "0.4.1" }
[build-dependencies]
usdpl-build = { version = "0.11", path = "../usdpl-build" }
usdpl-build = { version = "1.0", path = "../usdpl-build", features = [ "object-safe" ] }

View file

@ -1,6 +1,6 @@
[package]
name = "usdpl-build"
version = "0.11.0"
version = "1.0.0"
edition = "2021"
authors = ["NGnius <ngniusness@gmail.com>"]
license = "GPL-3.0-only"
@ -11,7 +11,7 @@ description = "Universal Steam Deck Plugin Library core"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
nrpc-build = { version = "0.10", path = "../../nRPC/nrpc-build" }
nrpc-build = { version = "1.0", path = "../../nRPC/nrpc-build" }
prost-build = "0.11"
prost-types = "0.11"
@ -21,3 +21,6 @@ quote = "1.0"
syn = "2.0"
proc-macro2 = "1.0"
[features]
object-safe = ["nrpc-build/async-trait"]

View file

@ -1,6 +1,6 @@
[package]
name = "usdpl-core"
version = "0.11.0"
version = "1.0.0"
authors = ["NGnius <ngniusness@gmail.com>"]
edition = "2021"
license = "GPL-3.0-only"

View file

@ -14,7 +14,7 @@ impl Platform {
{
Self::Decky
}
#[cfg(not(any(feature = "decky", feature = "crankshaft")))]
#[cfg(not(any(feature = "decky")))]
{
Self::Any
}

View file

@ -1,6 +1,6 @@
[package]
name = "usdpl-front"
version = "0.11.0"
version = "1.0.0"
authors = ["NGnius <ngniusness@gmail.com>"]
edition = "2021"
license = "GPL-3.0-only"
@ -44,8 +44,8 @@ js-sys = { version = "0.3" }
obfstr = { version = "0.3", optional = true }
hex = { version = "0.4", optional = true }
nrpc = { version = "0.10", path = "../../nRPC/nrpc", default-features = false}
usdpl-core = { version = "0.11", path = "../usdpl-core" }
nrpc = { version = "1.0", path = "../../nRPC/nrpc", default-features = false}
usdpl-core = { version = "1.0", path = "../usdpl-core" }
prost = "0.11"
log = "0.4"

View file

@ -2,7 +2,7 @@ use std::sync::atomic::{AtomicU64, Ordering};
use futures::{SinkExt, StreamExt, future::{select, Either}};
use gloo_net::websocket::{futures::WebSocket, Message};
use nrpc::{ClientHandler, ServiceError, ServiceClientStream, _helpers::async_trait, _helpers::bytes};
use nrpc::{ClientHandler, ServiceError, ServiceClientStream, /*_helpers::async_trait,*/ _helpers::bytes};
use wasm_bindgen_futures::spawn_local;
static LAST_ID: AtomicU64 = AtomicU64::new(0);
@ -143,8 +143,9 @@ impl WebSocketHandler {
}
}
#[async_trait::async_trait(?Send)]
//#[async_trait::async_trait(?Send)]
impl ClientHandler<'static> for WebSocketHandler {
#[allow(async_fn_in_trait)]
async fn call<'a: 'static>(
&self,
package: &str,