[package] name = "rusty_psn_dashboard" version = "0.1.0" edition = "2021" [dependencies] rusty_psn = git = "https://github.com/alsopub/rusty_psn", branch = "main" egui ecosystem for Windows native rendering egui = "0.28" eframe = "0.28" # The framework that compiles to native windows egui_extras = "0.28" # For tables and charts Async runtime (PSN calls are async) tokio = version = "1", features = ["full"] Serialization serde = version = "1", features = ["derive"] HTTP client (reqwest is used automatically by rusty_psn) reqwest = "0.12" Windows-specific: native dialog for picking trophy images rfd = "0.14" Logging env_logger = "0.11"
use std::fs; use rusty_psn::auth::npsso::NpssOAuth; use rusty_psn::Client; struct Config npsso: String,
impl PSNApp fn login(&mut self) let runtime = tokio::runtime::Runtime::new().unwrap(); runtime.block_on(async // Updated rusty_psn auth flow let auth = NpssOAuth::new(&npsso).await.unwrap(); let client = Client::new(auth).await.unwrap(); // We need to send client back to main thread. Use channels in prod. println!("Login success!"); ); ); self.loading = false; self.status = "Logged in (mock).".to_string(); rusty psn egui windows updated
Run:
egui_plot = "0.28" use egui_extras::TableBuilder, Column; use egui_plot::Plot, Line; // Inside CentralPanel: TableBuilder::new(ui) .striped(true) .resizable(true) .column(Column::auto()) // Game icon placeholder .column(Column::remainder()) // Game name .column(Column::exact(80.0)) // Progress % .header(20.0, |mut header| ui.label("Game Title"); ); header.col() .body(|mut body| { for game in &self.games { body.row(18.0, |mut row| { row.col(|ui| ui.label("🎮"); ); row.col(|ui| ui.label(&game.name); ); row.col(|ui| { ui.label(format!("{}%", game.progress)); }); }); } }); The "windows updated" part of our keyword means producing a standalone .exe that doesn’t require a Rust installation. [package] name = "rusty_psn_dashboard" version = "0
Enter the modern rusty_psn ecosystem. Combined with the immediate-mode GUI library egui and compiled to a native Windows executable, you can now build an incredibly fast, memory-safe, and visually responsive PSN dashboard.
use eframe::egui, Frame; use egui::CentralPanel, ScrollArea, CollapsingHeader, RichText, Color32; struct PSNApp client: Option<Client>, trophies: Vec<TrophySummary>, // We'll define this loading: bool, status: String, Enter the modern rusty_psn ecosystem
To make the app shine on Windows, leverage egui_extras for a Table view of game libraries and Plot for trophy progression.