wails/v3
Lea Anthony f1a4ffe72d
feat(linux): add libpath package for finding native library paths (#4847)
* feat(linux): add libpath package for finding native library paths

Add a new internal/libpath package that locates shared libraries (.so files)
on Linux systems. Supports multiple distributions and package managers.

Features:
- Multi-tier search: pkg-config -> ldconfig -> filesystem scanning
- Parallel search using goroutines for faster lookups
- Cached dynamic path discovery for Flatpak, Snap, and Nix
- Support for Debian/Ubuntu, Fedora/RHEL, Arch, openSUSE, NixOS
- Context-aware cancellation for graceful shutdown

Performance:
- Library found: ~1.4ms (parallel search)
- Library not found: ~46ms (was 84ms sequential)
- Cached path discovery: 14ns (was 15ms uncached)

* feat(libpath): add multi-library parallel search functions

Add functions to search for multiple library candidates in parallel:

- FindFirstLibrary: Search multiple libs in parallel, return first found
- FindFirstLibraryOrdered: Search in order of preference (for version priority)
- FindAllLibraries: Find all available libraries from a list

Useful when the exact library version is unknown, e.g.:
  match, _ := FindFirstLibrary("webkit2gtk-4.1", "webkit2gtk-4.0", "webkit2gtk-6.0")

Also adds findLibraryPathCtx for context-aware searching used by the
multi-library functions.

* refactor(libpath): split into separate files and fix race condition

Split libpath_linux.go into smaller, focused files:
- cache_linux.go: Path cache with thread-safe init/invalidate
- flatpak_linux.go: Flatpak runtime path discovery
- snap_linux.go: Snap package path discovery
- nix_linux.go: Nix/NixOS path discovery
- libpath_linux.go: Core search functions

Fixes:
- Fix data race between init() and invalidate() by holding mutex
  during cache writes inside sync.Once.Do (CodeRabbit review)
- Fix FindLibraryPathWithOptions not searching dynamic paths
  (Flatpak/Snap/Nix) - now uses GetAllLibPaths() (CodeRabbit review)
2026-01-04 11:59:22 +11:00
..
cmd/wails3 chore: disable setup wizard from CLI 2025-12-14 07:23:49 +11:00
examples fix(v3): overhaul drag-and-drop for Linux reliability and simplify Windows implementation (#4848) 2026-01-04 11:08:29 +11:00
internal feat(linux): add libpath package for finding native library paths (#4847) 2026-01-04 11:59:22 +11:00
pkg fix(v3): overhaul drag-and-drop for Linux reliability and simplify Windows implementation (#4848) 2026-01-04 11:08:29 +11:00
scripts Add clean v3 changelog validation workflow with external Go script 2025-07-13 10:33:00 +10:00
tasks feat: adapt iOS and Android message processors to RuntimeRequest transport 2025-12-10 21:27:04 +11:00
test fix: prevent window menu crash on Wayland (#4769) (#4770) 2025-12-12 17:59:47 +11:00
test-assets Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
tests/window-visibility-test feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
wep [WEP] Customise Window Titlebars (#3508) 2024-06-08 13:42:27 +10:00
.gitignore Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
.prettierignore chore: add Prettier as format tool (#2689) 2023-05-30 07:40:54 +10:00
.prettierrc.yml chore: add Prettier as format tool (#2689) 2023-05-30 07:40:54 +10:00
ANDROID_ARCHITECTURE.md feat: Add Android support for Wails v3 2025-11-28 21:06:59 +11:00
build_ios.sh Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
fix-darwin-ios-constraints.sh Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
go.mod perf(v3): optimize JSON processing and reduce allocations in hot paths (#4843) 2026-01-02 07:03:36 +11:00
go.sum perf(v3): optimize JSON processing and reduce allocations in hot paths (#4843) 2026-01-02 07:03:36 +11:00
IOS_ARCHITECTURE.md Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
IOS_FEATURES_TODO.md Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
IOS_RUNTIME.md Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
old Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
README.md Update doc dependencies 2023-09-08 10:57:47 +10:00
release-notes.txt v3.0.0-alpha.26 2025-08-24 02:40:05 +00:00
release_notes.md v3.0.0-alpha.26 2025-08-24 02:40:05 +00:00
Taskfile.yaml fix(v3): overhaul drag-and-drop for Linux reliability and simplify Windows implementation (#4848) 2026-01-04 11:08:29 +11:00
test-ios-compilation.go Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
test-new-ios-build.sh Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
TESTING.md feat: Complete App API restructuring with organized manager pattern (#4359) 2025-06-21 19:51:14 +10:00
UNRELEASED_CHANGELOG.md feat(linux): add libpath package for finding native library paths (#4847) 2026-01-04 11:59:22 +11:00
verify-ios-setup.sh Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00

v3 Alpha

Thanks for wanting to help out with testing/developing Wails v3! This guide will help you get started.

Getting Started

All the instructions for getting started are in the v3 documentation directory: mkdocs-website. Please read the README.md file in that directory for more information.