Try in Playground web
Open a ready-made Playground that loads the latest PHP.wasm manifest with php-extension, installs the smoke-test Blueprint, and lands on /native-api-smoke.php.
Experimental performance preview
Try the experimental wp_native_apis extension in WordPress Playground first. It loads before PHP starts, confirms the WASM extension was registered, and shows quick browser-side timing numbers for hot WP_HTML_Tag_Processor, XMLProcessor, and URLInTextProcessor paths.
Open a ready-made Playground that loads the latest PHP.wasm manifest with php-extension, installs the smoke-test Blueprint, and lands on /native-api-smoke.php.
Use the same manifest locally. The extension flag must be passed before PHP starts.
npx @wp-playground/cli@latest server \
--php=8.5 \
--php-extension=https://wordpress.github.io/php-toolkit/wp_native_apis-wasm-extension/latest/manifest.json \
--blueprint=https://raw.githubusercontent.com/WordPress/php-toolkit/trunk/extensions/native-apis/playground/blueprint.json
wp_native_apis WASM extension loaded, then shows whether native classes are available and a few quick timing cards.
WP_HTML_Tag_ProcessorFast scans and aggregate checks for common tag-processor and fragment-processor workloads.
Reference →XMLProcessorStreaming token, tag, namespace, attribute, and inventory summaries without building a DOM tree.
Reference →URLInTextProcessorA native candidate scanner for plain-text URL detection, with public handling still validating through the existing parser path.
Reference →When wp_native_apis is loaded before the toolkit, wrappers may delegate covered operations to native classes. If the extension is missing, incompatible, or disabled with WP_NATIVE_APIS_DISABLE_DEFAULTS, the same public APIs continue through pure-PHP implementations.
The release index is for pinned manifests, checksums, and exact Playground links. Use latest for a quick trial; use a commit-specific manifest when you need a reproducible demo.
The 10x claim comes from CI benchmark snapshots for the host Rust-backed extension. Playground is the easiest way to see that the extension loads and to get quick browser-side timing numbers; host PHP benchmarks are the better signal for Rust-backed throughput.
php -d extension=extensions/native-apis/target/release/libwp_native_apis.so \
bin/benchmark-native-apis.php --iterations=50 --mode=both --disable-native-defaults --require-native
Benchmark numbers are machine- and workflow-run-specific. Treat them as directional evidence for which workflows benefit from native batching, not as universal throughput guarantees.
After trying Playground, build the Rust-backed extension for your local host PHP ABI when you want the real native implementation and benchmark numbers. A build made for one PHP ABI cannot be reused for another.