Skip to content

Request: 32-bit (i686) support via lib32-vkbasalt-overlay package #10

@guglovich

Description

@guglovich

Problem

The current vkbasalt-overlay-git package provides only the x86_64 build of the overlay library. On Arch Linux, 32-bit games cannot use the overlay because /usr/lib32/libvkbasalt-overlay.so is missing. The standard lib32-vkbasalt package works for 32-bit games, but without the overlay UI functionality.

Technical Analysis

I reviewed the source code and believe 32-bit support should be feasible with minimal effort:

  • No architecture-specific code: the codebase contains no #ifdef x86_64 guards or assumptions about pointer sizes.
  • Meson build system: already architecture-agnostic and ready for cross-compilation or multilib builds.
  • ImGui backend: embedded as source (via imgui_impl_vulkan.cpp), no external 32-bit ImGui dependency needed.
  • SPIR-V shaders: architecture-independent by design.
  • Vulkan layer interface: the layer dispatch mechanism (vkCreateInstance, vkCreateDevice, etc.) works identically on both architectures.

What's Needed

Based on how lib32-vkbasalt handles 32-bit builds, the following changes would be required:

Compilation flags:

  • CFLAGS += -m32
  • CXXFLAGS += -m32
  • LDFLAGS += -m32

Pkg-config path:

  • PKG_CONFIG_PATH=/usr/lib32/pkgconfig

Meson configuration:

  • arch-meson --libdir=lib32

JSON manifest: the layer JSON file would need to be renamed to vkBasalt-overlay.x86.json (mirroring how lib32-vkbasalt uses vkBasalt.x86.json), with the library path pointing to /usr/lib32/libvkbasalt-overlay.so.

Additional 32-bit dependencies:

  • lib32-libx11
  • lib32-libxi
  • lib32-gcc-libs
  • lib32-glibc

Proposal

Two possible approaches:

Option A - Separate AUR package (recommended): create lib32-vkbasalt-overlay-git as a standalone AUR package, following the same pattern as lib32-vkbasalt relative to vkbasalt. This keeps the build scripts simple and lets users install only what they need.

Option B - Multilib in main PKGBUILD: add 32-bit build logic to the existing PKGBUILD, producing both x86_64 and i686 outputs. This is more complex but ensures both libraries are always in sync.

Offer to Help

I am happy to help with testing on a multilib Arch setup, and I am open to co-maintaining the 32-bit package if that would be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions