Files
alkane-toolkit/thirdparty/wx-rs/patches/0005-packaging-cleanups.patch
T
noahandClaude Opus 5.5 3ab329c5f0 Make the wx-rs patch queue reproducible and checkable
The queue had drifted from the patched tree it describes: 0003 predated
rounds 12-19 of bridge work, 0005 no longer applied on top of it, and the
Cargo.toml note and the case-duplicate readme.md were in no patch at all.
Vendor the pristine crates.io crate (sha256 pinned in VERSION) and add
scripts/wx_rs_patches.py: 'check' rebuilds the tree from upstream + patches
and requires an exact match, 'capture' records an edit as the next patch.
0002/0003 are regenerated to the current bridge files (0005's GTK tooltip
fix is folded into 0003); 0005 now carries the packaging leftovers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 18:32:30 -06:00

86 lines
3.5 KiB
Diff

Subject: [PATCH 0005] packaging: document the build-only reqwest; drop the case-duplicate readme.md
diff -ruN a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,6 +39,11 @@
[build-dependencies.embed-resource]
version = "1.3"
+# reqwest is only used by build.rs to download the wxWidgets source on
+# Windows/macOS; on Linux download_dist() returns before touching it, and it is
+# never linked into the runtime binary. Kept at the vendored 0.11 (the build tree
+# is fully vendored / offline); the h2 0.3 advisory it pulls is build-time only
+# and is documented as accepted in audit.toml (RUSTSEC-2026-0258).
[build-dependencies.reqwest]
version = "0.11"
features = ["blocking"]
diff -ruN a/readme.md b/readme.md
--- a/readme.md
+++ b/readme.md
@@ -1,64 +0,0 @@
-# wx-rs
-
-[![Crates.io](https://img.shields.io/crates/v/wx-rs)](https://crates.io/crates/wx-rs)
-[![Docs.rs](https://docs.rs/wx-rs/badge.svg)](https://docs.rs/wx-rs)
-
-*This is an alpha release. Don't expect much from me.*
-
-**Only builds on the MSVC toolchain right now**
-
-An extremely partial set of bindings to wxWidgets, for Rust. The intent is that you can import this and all the bits of wxWidgets provided are statically linked in. Implements [`HasRawWindowHandle`](https://crates.io/crates/raw-window-handle). Callbacks are used for rendering and event handling. Features:
-- Window initialization
-- Keyboard, mouse events
-- Clipboard support
-- Native menus
-- Cursor selection
-
-Some things that'd be great to have:
-- The build script has only been tested on MSVC. Previously I've gotten this to compile on OSX and Windows with the GNU toolchain. There's no reason why this can't work on Linux as well.
-- Icon support for Windows/Linux
-
-
-## Building
-The approach this crate takes is to download wxWidgets into the `./dist` directory, then build it. This means that you need to have a toolchain capable of compiling wxWidgets.
-
-Why are we doing this instead of using submodules? Because with submodules cargo would naturally check out files, but this isn't desirable since we want cargo to ignore these files when packaging (because wxWidgets is huge: The package, when you trim out all non-source files is still around 100MB).
-
-Why do we save/compile to `dist` rather than cargo's preferred `OUT_DIR`? Because with the latter, we'd have to recompile wxWidgets more frequently. Since it takes quite a while to do so, it's much nicer to only have to compile once and then have the artifact around forever.
-
-If you want to do a fresh install, just `rm -R ./dist`.
-
-# Building wxWidgets
-
-## Windows
-
-### Using the MSVC toolchain
-
-Make sure you're using ""x64 Native Tools Command Prompt for VS 2019"", and that cargo is in your path when compiling for the first time. After it's built, msys works fine to continue building things from the Rust side.
-- https://stackoverflow.com/questions/11065421/command-prompt-wont-change-directory-to-another-drive
-
-### Using the GNU toolchain on Windows
-This depends on nightly rust to build correctly
-
-#### Getting MSYS2
-https://www.msys2.org/
-
-```
-$ pacman -Syu
-$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-libexpat mingw-w64-x86_64-zlib msys2-w32api-runtime pacman -S mingw-w64-x86_64-lld
-```
-
-#### Building
-This is a note of what needs to be integrated into the build script.
-
-In a MSYS2 MinGW64 terminal:
-
-```
-$ cd dist/wxWidgets
-$ mkdir msw64-release-build
-$ ../configure --with-opengl --disable-shared
-$ make -j20
-```
-
-### Using the OSX toolchain
-... why aren't I documented? :(