Update builds for v0.5.0 release, including wasm compile step

This commit is contained in:
NGnius (Graham) 2023-11-18 14:03:53 -05:00
parent 0675f97cbe
commit 4261792fb8
7 changed files with 39 additions and 53 deletions

51
backend/Cargo.lock generated
View file

@ -296,7 +296,7 @@ name = "fantastic-rs"
version = "0.5.0" version = "0.5.0"
dependencies = [ dependencies = [
"log", "log",
"nrpc 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "nrpc",
"prost", "prost",
"serde", "serde",
"serde_json", "serde_json",
@ -304,7 +304,7 @@ dependencies = [
"sysfuss", "sysfuss",
"tokio", "tokio",
"usdpl-back", "usdpl-back",
"usdpl-build 0.11.0", "usdpl-build",
] ]
[[package]] [[package]]
@ -682,16 +682,6 @@ version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
[[package]]
name = "nrpc"
version = "0.10.0"
dependencies = [
"async-trait",
"bytes",
"futures",
"prost",
]
[[package]] [[package]]
name = "nrpc" name = "nrpc"
version = "0.10.0" version = "0.10.0"
@ -704,27 +694,13 @@ dependencies = [
"prost", "prost",
] ]
[[package]]
name = "nrpc-build"
version = "0.10.0"
dependencies = [
"nrpc 0.10.0",
"prettyplease 0.2.15",
"proc-macro2",
"prost-build",
"prost-types",
"protox",
"quote",
"syn 2.0.39",
]
[[package]] [[package]]
name = "nrpc-build" name = "nrpc-build"
version = "0.10.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6d47eea1ccd03b060da4b19bec6ac8addcd0129c03b15905a158cd20389d6a4" checksum = "d6d47eea1ccd03b060da4b19bec6ac8addcd0129c03b15905a158cd20389d6a4"
dependencies = [ dependencies = [
"nrpc 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "nrpc",
"prettyplease 0.2.15", "prettyplease 0.2.15",
"proc-macro2", "proc-macro2",
"prost-build", "prost-build",
@ -1269,6 +1245,8 @@ dependencies = [
[[package]] [[package]]
name = "sysfuss" name = "sysfuss"
version = "0.3.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f33bae529511a671b5f2ed4cc46ae0b2ccdf8c03ccf7eebe95a5a886ff7914dc"
[[package]] [[package]]
name = "tempfile" name = "tempfile"
@ -1458,34 +1436,21 @@ dependencies = [
"bytes", "bytes",
"gettext-ng", "gettext-ng",
"log", "log",
"nrpc 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "nrpc",
"prost", "prost",
"ratchet_rs", "ratchet_rs",
"tokio", "tokio",
"usdpl-build 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "usdpl-build",
"usdpl-core", "usdpl-core",
] ]
[[package]]
name = "usdpl-build"
version = "0.11.0"
dependencies = [
"nrpc-build 0.10.0",
"prettyplease 0.2.15",
"proc-macro2",
"prost-build",
"prost-types",
"quote",
"syn 2.0.39",
]
[[package]] [[package]]
name = "usdpl-build" name = "usdpl-build"
version = "0.11.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b732dfafa3876eb2acc3ff17ffc8ed370662e68de3bdf541fbbddaa71ebf52be" checksum = "b732dfafa3876eb2acc3ff17ffc8ed370662e68de3bdf541fbbddaa71ebf52be"
dependencies = [ dependencies = [
"nrpc-build 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "nrpc-build",
"prettyplease 0.2.15", "prettyplease 0.2.15",
"proc-macro2", "proc-macro2",
"prost-build", "prost-build",

View file

@ -15,18 +15,18 @@ usdpl-back = { version = "0.11", features = ["blocking", "decky"]}
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
nrpc = { version = "0.10", default-features = false } #path = "../../nRPC/nrpc" } nrpc = { version = "0.10", default-features = false }
prost = "0.11" prost = "0.11"
tokio = { version = "1", features = ["sync", "rt"] } tokio = { version = "1", features = ["sync", "rt"] }
sysfuss = { version = "0.3", features = ["derive"], path = "../../sysfs-nav" } sysfuss = { version = "0.3", features = ["derive"] }
# logging # logging
log = "0.4" log = "0.4"
simplelog = "0.12" simplelog = "0.12"
[build-dependencies] [build-dependencies]
usdpl-build = { version = "0.11", path = "../../usdpl-rs/usdpl-build" } usdpl-build = { version = "0.11" }
[profile.release] [profile.release]
debug = false debug = false

View file

@ -1,3 +1,7 @@
FROM ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest FROM ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest
#RUN pacman -S --noconfirm cmake make clang git
# for building Rust wasm frontend
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
ENTRYPOINT [ "/backend/entrypoint.sh" ] ENTRYPOINT [ "/backend/entrypoint.sh" ]

View file

@ -6,10 +6,17 @@ rustc --version
cargo --version cargo --version
echo "--- Building plugin backend ---" echo "--- Building plugin backend ---"
cargo build --release --features usdpl-back/decky cargo build --release
mkdir -p out #mkdir -p out
cp target/release/fantastic-rs out/backend cp target/release/fantastic-rs out/backend
echo "--- Building plugin frontend (wasm) ---"
# this only builds the webassembly part, while the actual frontend task builds the rest of it
cd /plugin/src/rust
./build.sh decky
cargo clean
cd /backend
echo " --- Cleaning up ---" echo " --- Cleaning up ---"
# remove root-owned target folder # remove root-owned target folder
cargo clean cargo clean

10
src/rust/Cargo.lock generated
View file

@ -430,6 +430,8 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
[[package]] [[package]]
name = "nrpc" name = "nrpc"
version = "0.10.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb8807391415c7f5673c2431e723597bbf6a5c2f510aab30dc8d48d0c76f5d26"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"bytes", "bytes",
@ -440,6 +442,8 @@ dependencies = [
[[package]] [[package]]
name = "nrpc-build" name = "nrpc-build"
version = "0.10.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6d47eea1ccd03b060da4b19bec6ac8addcd0129c03b15905a158cd20389d6a4"
dependencies = [ dependencies = [
"nrpc", "nrpc",
"prettyplease 0.2.12", "prettyplease 0.2.12",
@ -804,6 +808,8 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]] [[package]]
name = "usdpl-build" name = "usdpl-build"
version = "0.11.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b732dfafa3876eb2acc3ff17ffc8ed370662e68de3bdf541fbbddaa71ebf52be"
dependencies = [ dependencies = [
"nrpc-build", "nrpc-build",
"prettyplease 0.2.12", "prettyplease 0.2.12",
@ -817,6 +823,8 @@ dependencies = [
[[package]] [[package]]
name = "usdpl-core" name = "usdpl-core"
version = "0.11.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad1ff724f8214657706c4c877181d68d65a4db1c782e0a08a74402fe7c480f5"
dependencies = [ dependencies = [
"base64", "base64",
] ]
@ -824,6 +832,8 @@ dependencies = [
[[package]] [[package]]
name = "usdpl-front" name = "usdpl-front"
version = "0.11.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9e7ab9901d3db914e70594d94b2bd05c6c2c9d528937c8f466be581e0b79e8f"
dependencies = [ dependencies = [
"console_error_panic_hook", "console_error_panic_hook",
"futures", "futures",

View file

@ -14,11 +14,11 @@ crate-type = ["cdylib", "rlib"]
[dependencies] [dependencies]
usdpl-front = { version = "0.11" } usdpl-front = { version = "0.11" }
nrpc = { version = "0.10", path = "../../../nRPC/nrpc", default-features = false } nrpc = { version = "0.10", default-features = false }
prost = "0.11" prost = "0.11"
[build-dependencies] [build-dependencies]
usdpl-build = { version = "0.11", path = "../../../usdpl-rs/usdpl-build" } usdpl-build = { version = "0.11" }
[features] [features]
debug = ["usdpl-front/debug"] debug = ["usdpl-front/debug"]

View file

@ -2,12 +2,12 @@ fn main() {
println!("CWD: {}", std::env::current_dir().unwrap().display()); println!("CWD: {}", std::env::current_dir().unwrap().display());
usdpl_build::front::build( usdpl_build::front::build(
[format!( [format!(
"{}/../../backend-rs/protos/fantastic.proto", "{}/../../backend/protos/fantastic.proto",
std::env::current_dir().unwrap().display() std::env::current_dir().unwrap().display()
)] )]
.into_iter(), .into_iter(),
[format!( [format!(
"{}/../../backend-rs/protos/", "{}/../../backend/protos/",
std::env::current_dir().unwrap().display() std::env::current_dir().unwrap().display()
)] )]
.into_iter(), .into_iter(),