From 0d3f33cede8521b060b061e905375fe5f3f772eb Mon Sep 17 00:00:00 2001 From: funman300 Date: Sat, 15 Aug 2026 19:24:44 +0000 Subject: [PATCH] fix(hook): build version.dll as its own workspace root openfut-hook is a Windows version.dll proxy injected into the FIFA client, but as a member of the parent OpenFUT workspace its [profile.release] was silently ignored (cargo only honors profiles at the workspace root, and forbids per-package `panic` overrides). The shipped DLL was therefore built opt-level=3 / strip=debuginfo / panic=UNWIND -- and unwinding a Rust panic across the DllMain/FFI boundary into the game process is UB. Add an empty [workspace] table so the crate is its own root and its release profile (panic=abort, strip=symbols, opt-level=s) applies. Paired with the parent workspace `exclude`. Also lands the artifact in openfut-hook/target/ (matching the launcher config.rs default hook_dll_path) instead of the parent target/. Cross-build verified: panic=abort now emitted; DLL 1200126 -> 861696 B. --- openfut-hook/Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openfut-hook/Cargo.toml b/openfut-hook/Cargo.toml index fcf2b26..6c8e75b 100644 --- a/openfut-hook/Cargo.toml +++ b/openfut-hook/Cargo.toml @@ -1,3 +1,9 @@ +# Standalone workspace root: this Windows-only version.dll proxy is deliberately +# NOT a member of the OpenFUT workspace (see that root's `exclude`) so its own +# [profile.release] below actually applies. An empty [workspace] table stops Cargo +# from walking up and re-attaching this crate to the parent workspace. +[workspace] + [package] name = "openfut-hook" version = "0.1.0"