---
type: "post"
id: "rust-anything-v3-3-0-adds-php-and-983e75"
slug: "rust-anything-v3-3-0-adds-php-and-983e75"
title: "rust-anything v3.3.0 adds PHP and C# bridges into Rust"
description: "rust-anything v3.3.0 adds bridges that let selected PHP functions and C# methods call Rust implementations through generated wrappers."
retrieval_nugget: "rust-anything v3.3.0 adds bridges that let selected PHP functions and C# methods call Rust implementations through generated wrappers. The release pairs that path with recording and behavior checks, making it a concrete option for teams testing incremental migrations—but its own examples also show that bridge overhead can erase performance gains."
published_at: "2026-11-23"
updated_at: "2026-11-23"
record_date: "2026-11-23"
date_kind: "published_at"
topics: ["google"]
entities: ["rust-anything","PEAR XML_Util","Google.Protobuf","PHP","C#","Rust"]
related_patterns: []
novelty_label: "new_fact"
what_changed: null
prior_refs: []
source_url: "https://github.com/erkamyaman/rust-anything/releases/tag/v3.3.0"
source_urls: ["https://github.com/erkamyaman/rust-anything/releases/tag/v3.3.0"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:rust-anything-v3-3-0-adds-php-and-983e75"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/rust-anything-v3-3-0-adds-php-and-983e75/","markdown":"https://newruntime.com/posts/rust-anything-v3-3-0-adds-php-and-983e75.md","json":"https://newruntime.com/posts/rust-anything-v3-3-0-adds-php-and-983e75.json"}
markdown_url: "https://newruntime.com/posts/rust-anything-v3-3-0-adds-php-and-983e75.md"
---

# rust-anything v3.3.0 adds PHP and C# bridges into Rust

## Retrieval answer

rust-anything v3.3.0 adds bridges that let selected PHP functions and C# methods call Rust implementations through generated wrappers. The release pairs that path with recording and behavior checks, making it a concrete option for teams testing incremental migrations—but its own examples also show that bridge overhead can erase performance gains.

## Summary
rust-anything v3.3.0 adds bridges that let selected PHP functions and C# methods call Rust implementations through generated wrappers. The release pairs that path with recording and behavior checks, making it a concrete option for teams testing incremental migrations—but its own examples also show that bridge overhead can erase performance gains.

## What happened
The v3.3.0 release notes describe PHP and C# as newly bridgeable unit types in rust-anything, a tool for moving compatible code into Rust. The project generates an interface around Rust code rather than requiring a full application rewrite at once. Its record, build, diff, and bench commands are used to exercise original and bridged implementations and compare their behavior.

For PHP, the bridge accepts a unit's top-level functions, namespaced or global, when parameters are scalar, strings, lists, or associative arrays. It generates a JSON dispatcher crate and a `php/<crate>.php` wrapper that redeclares those functions with their original parameters and calls the Rust library through `ext-ffi`. The `record` command runs the original code with a generated driver, loading `vendor/autoload.php` when present. Omitted middle arguments are passed by name so defaults apply. Build places the library beside the wrapper, while diff and bench exercise it through that wrapper. Comparison includes PHP values, exceptions by class, and printed output. Classes, static methods, object-typed parameters or returns, references, variadics, callables, and generators remain in PHP; shadow and `--batch` refuse PHP units.

For an undocumented bare PHP array, the bridge uses `serde_json::Value`; a PHPDoc type can instead guide conversion, such as `list<float>` to `Vec<f64>`. The release reports a real-code run on PEAR XML_Util 1.4.5 behind a facade of seven top-level functions, using PHP 8.5.12. All 1,838 recorded cases passed the gate. Yet the JSON bridge made every function slower than PHP in that benchmark, with a 0.09x geometric mean on a busy machine.

The C# bridge covers public static methods on public classes. It generates a JSON dispatcher over the C ABI and a `cs/<Lib>.cs` wrapper, exposing corresponding classes and signatures under `<namespace>.Rust` through P/Invoke. Supported argument shapes include scalars, strings, arrays, lists, string-keyed dictionaries, nullable values, and records or plain project classes with public auto-properties and no constructor arguments. Generic, `ref`/`out`/`in`, `params`, overloaded and async methods, as well as types such as `decimal`, `char`, `ulong`, delegates, tuples, and spans stay in C#. Drivers built with `dotnet build` compare typed JSON results, exception types, and console output. The Google.Protobuf 3.29.0 test covered 16 methods and 2,941 cases; two lone-surrogate strings are recorded as known differences because Rust `String` cannot hold them. The release reports call costs of 0.56–3.3 microseconds, making these 29–87 nanosecond functions 0.03x as fast through Rust.

## What the archive adds
New Runtime's earlier coverage on 2026-11-19 described rust-anything as a tool for staged application rewrites with behavior checks ([the earlier note](https://newruntime.com/posts/rust-anything-is-an-open-source-tool-for-2953cc/)). This release is a new fact on that known story: it extends the bridge approach to PHP and C#, and reports language-specific compatibility limits and benchmark results.

## Trend signal
This does not yet fit a pattern New Runtime tracks. The release is nevertheless notable for treating behavioral comparison—return values, exception types, and printed output—as part of a constrained migration workflow rather than presenting language replacement as a purely mechanical conversion.

## Why it matters
A language migration often fails not because Rust cannot express a target function, but because teams cannot establish that the replacement preserves observable behavior. rust-anything's generated drivers make the comparison explicit: values, exceptions, and printed output are all part of the gate. That can help teams isolate a compatible seam instead of committing to a broad rewrite.

The performance figures are equally useful as a warning. The PHP and C# examples both report bridge overhead large enough to make short functions substantially slower, despite passing functional checks. A team should therefore treat these bridges as a way to identify and validate migration candidates, not as evidence that Rust will automatically accelerate an application. Larger or compute-heavy units may have a different cost profile, but the release does not establish that.

## What happens next
- **The project will add further language adapters while keeping unsupported constructs explicit.** (6 months, 55%). Watch for: release notes adding adapters and documenting which code remains in its original language.

## Limits and uncertainty
The measurements are examples from specific libraries and versions, not broad language benchmarks. The release does not establish performance for larger functions, production applications, or other PHP and C# workloads. Compatibility is deliberately partial, and unsupported constructs remain in the source language; teams must determine how much of their real code fits the bridge. The reported tests and timings are project results, not independently replicated here. The release also does not establish whether every generated wrapper or build workflow will behave identically across operating systems and project configurations.

## Skill to build now
Choose a small, stable set of functions with clear inputs and outputs, then record baseline cases before moving any implementation behind a bridge. Include exceptions and printed output in the comparison, not just return values. After the behavior gate passes, benchmark the bridged calls separately: for tiny functions, wrapper and FFI costs may outweigh faster Rust execution. Keep unsupported shapes in the original language until a specific adapter supports them.

## Reader takeaway
The useful promise in rust-anything v3.3.0 is not “PHP and C# now run faster in Rust.” It is that teams can test selected cross-language replacements against recorded behavior. Use the bridges to find and verify migration seams, and let measured end-to-end performance—not the language switch itself—decide what moves.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Google](https://newruntime.com/topics/google.md): Explore the google topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
