From 6d56b9b52396d0f3ffa2a0c38f5ee1392be4752d Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Thu, 16 Jul 2026 17:03:33 +0200 Subject: [PATCH] chore: drop the cmd.c cmdCount/cmdLine shim The shim existed to satisfy Nim's cmdCount/cmdLine globals, which the static library referenced when it pulled in the command-line machinery. Nothing in liblogosdelivery.a (nor any archive on the link line) references either symbol now, and a clean rebuild of the workspace and the basic example links without it. Co-Authored-By: Claude Opus 4.8 --- waku-bindings/build.rs | 5 ----- waku-bindings/src/cmd.c | 13 ------------- 2 files changed, 18 deletions(-) delete mode 100644 waku-bindings/src/cmd.c diff --git a/waku-bindings/build.rs b/waku-bindings/build.rs index 6db8e4e..328a7ba 100644 --- a/waku-bindings/build.rs +++ b/waku-bindings/build.rs @@ -182,11 +182,6 @@ fn emit_link_flags(nwaku_path: &Path) { println!("cargo:rustc-link-lib=static={librln}"); // libbacktrace is not linked: the vendor builds with -d:disable_libbacktrace. - - cc::Build::new() - .file("src/cmd.c") // Compile the C file - .compile("cmditems"); // Compile it as a library - println!("cargo:rustc-link-lib=static=cmditems"); } #[cfg(not(doc))] diff --git a/waku-bindings/src/cmd.c b/waku-bindings/src/cmd.c deleted file mode 100644 index 4c9147a..0000000 --- a/waku-bindings/src/cmd.c +++ /dev/null @@ -1,13 +0,0 @@ - -/* - This file is needed to avoid errors like the following when linking the waku-sys lib crate: - <> - and - <> -*/ - -#include - -int cmdCount = 0; -char** cmdLine = NULL; -