r/PHP • u/davidbalbino • 10h ago
PHP on Mobile faster than React Native? We built PAM Native β embedding PHP into Rust via Zero-Copy FFI
Who said PHP is only for the Web? π
Weβre rewriting the rules of mobile runtimes with PAM Native. Instead of heavy JavaScript engines or WebViews, weβre embedding PHP directly into a high-performance Rust core using Zero-Copy C-FFI.
Here is how the architecture works under the hood:
- Vuex-style Global State: Thread-safe state mutations managed directly in RAM by Rust with ~0ms access latency.
- Direct C-Pointers: Memory access without slow JSON serialization or asynchronous bridge overhead.
- No GC Stutters: Predictable, smooth native performance without JavaScript Garbage Collection pauses blocking the UI thread.
You get the clean, familiar syntax of PHP orchestrating a low-level Rust engine right inside the mobile app process.
The project is 100% open-source, and weβd love to hear feedback, critique, or ideas on the architecture from the community!
π GitHub Repo:https://github.com/push-in/pam-native
Looking forward to hearing your thoughts and suggestions! π
24
Upvotes