Collected sources and patterns will appear here. Add from search or the patterns library.
Provide a WebAssembly (Wasm) runtime that lets PHP applications load and execute Wasm modules.
Utility
stars
1,049
forks
43
Quantitative signals: wasmerio/wasmer-php has strong adoption relative to typical language bindings (≈1049 stars) but modest community branching (43 forks) and low stated velocity (0.0/hr). Age is very high (2762 days), implying long-term maintenance/availability rather than recent explosive growth. Defensibility (why a 6/10): - What’s defensible: This project is effectively a language bridge—embedding a Wasm runtime into a PHP developer experience. That creates practical friction for adopters compared to “just use another runtime,” because you need correct FFI/extension packaging, stable APIs, and safe sandbox semantics for PHP users. In practice, language bindings often become sticky when teams build internal tooling around them. - What limits the score: The core capability (Wasm execution) is not unique to this repo. Wasm runtimes are commoditized, and bindings/wrappers for major languages are a known pattern. Without evidence of a differentiated feature set (e.g., special performance work, unique tooling, proprietary compatibility layers), the moat is more “integration reliability + ecosystem gravity” than a deep technical breakthrough. - No strong “network effects” visible from the given signals: stars are high, but forks/velocity don’t show rapid community expansion. That suggests usage exists, but the ecosystem may not be accelerating in a way that would raise switching costs substantially. Novelty: incremental. This is best understood as applying a known technique (embedding a Wasm runtime) to a new host language (PHP). The novelty is primarily in engineering integration rather than inventing a new execution model. Frontier-lab obsolescence risk (medium): - Frontier labs (OpenAI/Anthropic/Google) aren’t likely to ship a dedicated Wasm-in-PHP runtime themselves as a standalone product. - However, medium risk exists because major platform vendors could add Wasm execution into their serverless/tooling stacks or SDKs that reduce the need for third-party PHP bindings. Also, large cloud providers could provide PHP-compatible Wasm execution services. - That said, direct “competition” from frontier labs is less likely than adjacent platform features; thus not high risk. Three-axis threat profile: 1) platform_domination_risk: medium - Who could absorb/replace it: Cloud runtimes/managed platforms that execute Wasm modules and expose them to web stacks could reduce the value of a PHP in-process runtime. For example, platform-level Wasm offerings in serverless environments (AWS/GCP/Azure-related ecosystems) or container/edge platforms that standardize Wasm execution. - Timeline: plausible within 1–2 years for adjacent platform capabilities to make some in-language runtimes optional. 2) market_consolidation_risk: medium - Why not low: Language bindings fragment easily, but the Wasm runtime ecosystem tends to converge on a few mature engines plus maintained bindings. If one engine becomes the default for PHP (or if cloud platforms standardize on a specific execution pathway), smaller bindings can lose mindshare. - Why not high: The PHP market is large enough to sustain multiple viable approaches (in-process runtime vs. out-of-process service). Consolidation is likely, but not guaranteed. 3) displacement_horizon: 1-2 years - Mechanism: Platform SDKs and managed Wasm execution (plus emerging “run Wasm safely” capabilities in common deployment toolchains) could displace the need for a dedicated PHP runtime extension for many use cases. - Meanwhile, for developers needing embedded/sandboxed execution with low latency and local execution semantics, this project could remain valuable longer. Key risks: - Integration/compliance risk: If the underlying runtime API or Wasm ecosystem changes, bindings can lag. With observed low velocity, there may be concern about responsiveness to upstream changes. - Commoditization: Competing bindings for PHP or thin wrappers around other engines (e.g., Wasmtime-based efforts, or community forks) can reduce differentiation. - Platform shift to managed execution: If managed Wasm becomes the default in production environments, in-language bindings become an optimization rather than necessity. Key opportunities: - If wasmer-php continues to mature into a production-grade, well-maintained PHP extension with strong compatibility, it can become the de facto standard for Wasm in PHP. - Unique value could be built by offering higher-level tooling: module packaging, caching/JIT tuning, deterministic execution profiles, debugging/observability, and secure configuration templates tailored for PHP frameworks (Laravel/Symfony). - Community momentum could increase switching costs if teams build test harnesses, deployment recipes, and internal platform patterns around it. Adjacent competitors / alternatives (not exhaustive, but directionally relevant): - Other Wasm engines with language bindings (e.g., Wasmtime ecosystems, Wasmer ecosystem variants) and community PHP wrappers. - Managed Wasm execution offerings (cloud/edge) where PHP interacts via HTTP/IPC rather than embedding a runtime. - Container/sidecar patterns where Wasm execution is offloaded to a separate service, avoiding the need for a PHP-native runtime binding. Bottom line: wasmer-php has meaningful adoption (high stars, very old, likely battle-tested at least historically) and some integration stickiness, but the core capability is not a frontier breakthrough and platform-managed execution could reduce the necessity of PHP-specific runtimes. Hence defensibility 6/10 and frontier risk medium.
TECH STACK
INTEGRATION
library_import
READINESS
The reusable building blocks distilled from this project — each a mechanism you could lift into your own.
Call an exported WebAssembly function with host arguments, managing type transitions across the FFI boundary.