Skip to content

fix(android): port 60 missing bloom_* FFI exports (parity with linux/macOS) + v0.4.14#59

Merged
proggeramlug merged 2 commits into
mainfrom
fix/android-ffi-parity
Jun 8, 2026
Merged

fix(android): port 60 missing bloom_* FFI exports (parity with linux/macOS) + v0.4.14#59
proggeramlug merged 2 commits into
mainfrom
fix/android-ffi-parity

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Problem

bloom-android exported 209 bloom_* FFI functions vs 265 on linux/macOS — 60 missing (scene graph, lighting, post-FX, picking, render-textures, frame callbacks, bloom_splat_impulse).

Perry statically links the engine into libperry_app.so, and the engine's shared TS (core/index.ts) references these symbols, so every Perry-built Android app crashed at launch:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "bloom_splat_impulse"
  referenced by ".../lib/arm64-v8a/libperry_app.so"
  at com.perry.app.PerryActivity.startNative

Fix

  • Ported the 60 implementations verbatim from native/linux/src/lib.rs (Android shares the same wgpu renderer + scene crate, so no behavioural change vs linux).
  • Added the two backing statics they use: LAST_PICK, LAST_PROJECT.
  • Bumped to v0.4.14.

Verification

cargo check --target aarch64-linux-android passes (only pre-existing unused-var warnings). A Perry Android build against this lib loads + runs instead of crashing on dlopen.

Mirrors #58-era parity work and 4af46ac (tvOS parity).

…ux/macOS

The Android native lib (bloom-android) exported 209 bloom_* FFI functions vs
265 on linux/macOS — 60 were missing (scene graph, lighting, post-FX, picking,
render-textures, frame callbacks, splat impulse). Because perry statically links
the engine into libperry_app.so, the undefined symbols (first hit:
bloom_splat_impulse, referenced from core/index.ts) crashed dlopen at launch with
UnsatisfiedLinkError on every Perry-built Android app.

Ported the implementations verbatim from native/linux/src/lib.rs (Android shares
the same wgpu renderer + scene crate) plus the two backing statics they use
(LAST_PICK, LAST_PROJECT). Verified: cargo check --target aarch64-linux-android
passes. Mirrors 4af46ac (tvOS parity).
@proggeramlug proggeramlug merged commit e941577 into main Jun 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant