From 3de4056df4ea5d0afbcea388ad8d681daea1aac3 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 8 Apr 2026 03:30:04 -0500 Subject: Remove NaK/Rust dependency, port remaining functionality to native C++ Replace NaK Rust crate and nak_ffi with native C++ implementations: - Game detection (Steam, Heroic, Bottles), VDF parser, icon extraction - Prefix symlinks, SLR manager, Steam path detection - Known games database Add FUSE VFS optimizations: zero-copy reads via fuse_reply_data, default_permissions mount option, FUSE_CAP_ASYNC_DIO, FUSE_CAP_EXPIRE_ONLY, lookup cache parent index, cached mode bits, increased I/O buffer sizes. Update build system, prefix setup, and various fixes. Co-Authored-By: Claude Opus 4.6 (1M context) --- libs/nak/src/dxvk.rs | 69 ---------------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 libs/nak/src/dxvk.rs (limited to 'libs/nak/src/dxvk.rs') diff --git a/libs/nak/src/dxvk.rs b/libs/nak/src/dxvk.rs deleted file mode 100644 index b335773..0000000 --- a/libs/nak/src/dxvk.rs +++ /dev/null @@ -1,69 +0,0 @@ -//! DXVK configuration management for Fluorine Manager. -//! -//! Downloads dxvk.conf from upstream, appends Fluorine-specific settings, -//! and stores at `~/.local/share/fluorine/config/dxvk.conf`. - -use std::error::Error; -use std::fs; -use std::path::{Path, PathBuf}; - -use crate::logging::{log_info, log_warning}; - -const DXVK_CONF_URL: &str = - "https://raw.githubusercontent.com/doitsujin/dxvk/master/dxvk.conf"; - -const DXVK_CUSTOM_SETTINGS: &str = r#" -# Fluorine Custom Settings -# Disable Graphics Pipeline Library (can cause issues with modded games) -dxvk.enableGraphicsPipelineLibrary = False -"#; - -/// Get the path where the DXVK config will be stored. -pub fn get_dxvk_conf_path() -> PathBuf { - crate::paths::data_dir().join("config/dxvk.conf") -} - -/// Ensure the dxvk.conf file exists, downloading if necessary. -/// -/// Returns the path to the config file. -pub fn ensure_dxvk_conf() -> Result> { - let conf_path = get_dxvk_conf_path(); - - // If it already exists, return it - if conf_path.exists() { - return Ok(conf_path); - } - - download_and_create_dxvk_conf(&conf_path) -} - -/// Download the upstream dxvk.conf, append custom settings, and write to `dest`. -pub fn download_and_create_dxvk_conf(dest: &Path) -> Result> { - // Ensure parent directory exists - if let Some(parent) = dest.parent() { - fs::create_dir_all(parent)?; - } - - log_info("Downloading dxvk.conf from upstream..."); - - let upstream_content = match ureq::get(DXVK_CONF_URL).call() { - Ok(response) => { - let mut body = String::new(); - response.into_reader().read_to_string(&mut body)?; - body - } - Err(e) => { - log_warning(&format!("Failed to download dxvk.conf: {}", e)); - // Create with just custom settings if download fails - String::new() - } - }; - - let full_content = format!("{}\n{}", upstream_content, DXVK_CUSTOM_SETTINGS); - fs::write(dest, &full_content)?; - - log_info(&format!("Created dxvk.conf at {:?}", dest)); - Ok(dest.to_path_buf()) -} - -use std::io::Read as _; -- cgit v1.3.1